File: publish-maven.gradle

package info (click to toggle)
libspring-java 4.3.30-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 65,728 kB
  • sloc: java: 566,974; xml: 13,706; sql: 2,313; sh: 87; ruby: 75; jsp: 33; makefile: 29; javascript: 11; python: 4
file content (55 lines) | stat: -rw-r--r-- 1,502 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
apply plugin: "propdeps-maven"

install {
	repositories.mavenInstaller {
		customizePom(pom, project)
	}
}

def customizePom(pom, gradleProject) {
	pom.whenConfigured { generatedPom ->
		// eliminate test-scoped dependencies (no need in maven central poms)
		generatedPom.dependencies.removeAll { dep ->
			dep.scope == "test"
		}

		// sort to make pom dependencies order consistent to ease comparison of older poms
		generatedPom.dependencies = generatedPom.dependencies.sort { dep ->
			"$dep.scope:$dep.groupId:$dep.artifactId"
		}

		// add all items necessary for maven central publication
		generatedPom.project {
			name = gradleProject.description
			description = gradleProject.description
			url = "https://github.com/spring-projects/spring-framework"
			organization {
				name = "Spring IO"
				url = "https://projects.spring.io/spring-framework"
			}
			licenses {
				license {
					name "Apache License, Version 2.0"
					url "https://www.apache.org/licenses/LICENSE-2.0"
					distribution "repo"
				}
			}
			scm {
				url = "https://github.com/spring-projects/spring-framework"
				connection = "scm:git:git://github.com/spring-projects/spring-framework"
				developerConnection = "scm:git:git://github.com/spring-projects/spring-framework"
			}
			developers {
				developer {
					id = "jhoeller"
					name = "Juergen Hoeller"
					email = "jhoeller@pivotal.io"
				}
			}
			issueManagement {
				system = "Jira"
				url = "https://jira.springsource.org/browse/SPR"
			}
		}
	}
}