Rob Winch
2014-02-18 15:34:31 -06:00
parent 80ac8ffc79
commit 3c8be78162
2 changed files with 51 additions and 0 deletions

View File

@@ -12,6 +12,7 @@ allprojects {
subprojects {
apply plugin: 'java'
apply plugin: 'eclipse'
apply from: "$rootDir/gradle/publish-maven.gradle"
sourceCompatibility = 1.6
targetCompatibility = 1.6

View File

@@ -0,0 +1,50 @@
apply plugin: "maven"
install {
repositories.mavenInstaller {
customizePom(pom, project)
}
}
def customizePom(pom, gradleProject) {
pom.whenConfigured { generatedPom ->
// 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-loaded"
organization {
name = "Spring IO"
url = "http://projects.spring.io/spring-loaded"
}
licenses {
license {
name "The Apache Software License, Version 2.0"
url "http://www.apache.org/licenses/LICENSE-2.0.txt"
distribution "repo"
}
}
scm {
url = "https://github.com/spring-projects/spring-loaded"
connection = "scm:git:git://github.com/spring-projects/spring-loaded"
developerConnection = "scm:git:git://github.com/spring-projects/spring-loaded"
}
developers {
developer {
id = "aclement"
name = "Andy Clement"
email = "aclement@gopivotal.com"
}
}
issueManagement {
system = "GitHub"
url = "https://github.com/spring-projects/spring-loaded/issues"
}
}
}
}