60 lines
1.5 KiB
Groovy
60 lines
1.5 KiB
Groovy
apply plugin: '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'
|
|
}
|
|
|
|
// Ensure consistent ordering of dependencies to ease comparison with 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 = 'http://projects.spring.io/spring-credhub'
|
|
organization {
|
|
name = 'Spring IO'
|
|
url = 'https://spring.io'
|
|
}
|
|
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-credhub'
|
|
connection = 'scm:git:https://github.com/spring-projects/spring-credhub.git'
|
|
developerConnection = 'scm:git:https://github.com/spring-projects/spring-credhub.git'
|
|
}
|
|
|
|
issueManagement {
|
|
system = 'GitHub'
|
|
url = 'https://github.com/spring-projects/spring-credhub/issues'
|
|
}
|
|
|
|
developers {
|
|
developer {
|
|
id = 'sfrederick'
|
|
name = 'Scott Frederick'
|
|
email = 'sfrederick@pivotal.io'
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|