diff --git a/build.gradle b/build.gradle index dc8f4b370..0d88c0b90 100644 --- a/build.gradle +++ b/build.gradle @@ -166,26 +166,26 @@ allprojects { mavenOssUser = System.getenv('MAVEN_OSS_USER') mavenOssPassword = System.getenv('MAVEN_OSS_PASSWORD') - // pom configuration for MavenPublication + // pom configuration for MavenPublication, as per https://docs.gradle.org/current/userguide/publishing_maven.html#sec:modifying_the_generated_pom pomConfig = { licenses { license { - name "The Apache Software License, version 2.0" - url "http://www.apache.org/licenses/LICENSE-2.0.txt" - distribution "repo" + name = "The Apache Software License, version 2.0" + url = "http://www.apache.org/licenses/LICENSE-2.0.txt" + distribution = "repo" } } developers { developer { - id "rpopma" - name "Remko Popma" - email "rpopma@apache.org" + id = "rpopma" + name = "Remko Popma" + email = "rpopma@apache.org" } } scm { - url "https://github.com/remkop/picocli/tree/master" - connection 'scm:git:https://github.com/remkop/picocli.git' - developerConnection 'scm:git:ssh://github.com:remkop/picocli.git' + url = "https://github.com/remkop/picocli/tree/master" + connection = 'scm:git:https://github.com/remkop/picocli.git' + developerConnection = 'scm:git:ssh://github.com:remkop/picocli.git' } } } @@ -442,15 +442,14 @@ publishing { groupId 'info.picocli' artifactId bintrayPackage version "$projectVersion" - pom.withXml { - def root = asNode() - root.appendNode('packaging', 'jar') - root.appendNode('name', 'picocli - a mighty tiny Command Line Interface') - root.appendNode('description', description) - root.appendNode('url', 'http://picocli.info') - root.appendNode('inceptionYear', '2017') - root.children().last() + pomConfig + pom { + packaging = 'jar' + name = 'picocli - a mighty tiny Command Line Interface' + description = project.description + url = 'http://picocli.info' + inceptionYear = '2017' } + pom pomConfig } } } diff --git a/picocli-codegen/build.gradle b/picocli-codegen/build.gradle index b55fbadf4..2ed697c72 100644 --- a/picocli-codegen/build.gradle +++ b/picocli-codegen/build.gradle @@ -93,15 +93,14 @@ publishing { groupId 'info.picocli' artifactId bintrayPackage version "$projectVersion" - pom.withXml { - def root = asNode() - root.appendNode('packaging', 'jar') - root.appendNode('name', bintrayPackage) - root.appendNode('description', description) - root.appendNode('url', 'http://picocli.info') - root.appendNode('inceptionYear', '2018') - root.children().last() + pomConfig + pom { + packaging = 'jar' + name = bintrayPackage + description = project.description + url = 'http://picocli.info' + inceptionYear = '2018' } + pom pomConfig } } } diff --git a/picocli-groovy/build.gradle b/picocli-groovy/build.gradle index 7a9b83140..733e27ee8 100644 --- a/picocli-groovy/build.gradle +++ b/picocli-groovy/build.gradle @@ -93,15 +93,14 @@ publishing { groupId 'info.picocli' artifactId bintrayPackage version "$projectVersion" - pom.withXml { - def root = asNode() - root.appendNode('packaging', 'jar') - root.appendNode('name', bintrayPackage) - root.appendNode('description', description) - root.appendNode('url', 'http://picocli.info') - root.appendNode('inceptionYear', '2018') - root.children().last() + pomConfig + pom { + packaging = 'jar' + name = bintrayPackage + description = project.description + url = 'http://picocli.info' + inceptionYear = '2018' } + pom pomConfig } } } diff --git a/picocli-shell-jline2/build.gradle b/picocli-shell-jline2/build.gradle index 67129c902..13ab6dfae 100644 --- a/picocli-shell-jline2/build.gradle +++ b/picocli-shell-jline2/build.gradle @@ -76,15 +76,14 @@ publishing { groupId 'info.picocli' artifactId bintrayPackage version "$projectVersion" - pom.withXml { - def root = asNode() - root.appendNode('packaging', 'jar') - root.appendNode('name', bintrayPackage) - root.appendNode('description', description) - root.appendNode('url', 'http://picocli.info') - root.appendNode('inceptionYear', '2018') - root.children().last() + pomConfig + pom { + packaging = 'jar' + name = bintrayPackage + description = project.description + url = 'http://picocli.info' + inceptionYear = '2018' } + pom pomConfig } } } diff --git a/picocli-shell-jline3/build.gradle b/picocli-shell-jline3/build.gradle index b0f4e199b..e6f35eb11 100644 --- a/picocli-shell-jline3/build.gradle +++ b/picocli-shell-jline3/build.gradle @@ -79,15 +79,14 @@ publishing { groupId 'info.picocli' artifactId bintrayPackage version "$projectVersion" - pom.withXml { - def root = asNode() - root.appendNode('packaging', 'jar') - root.appendNode('name', bintrayPackage) - root.appendNode('description', description) - root.appendNode('url', 'http://picocli.info') - root.appendNode('inceptionYear', '2018') - root.children().last() + pomConfig + pom { + packaging = 'jar' + name = bintrayPackage + description = project.description + url = 'http://picocli.info' + inceptionYear = '2018' } + pom pomConfig } } } diff --git a/picocli-spring-boot-starter/build.gradle b/picocli-spring-boot-starter/build.gradle index 73aca3854..3098467d8 100644 --- a/picocli-spring-boot-starter/build.gradle +++ b/picocli-spring-boot-starter/build.gradle @@ -82,15 +82,14 @@ publishing { groupId 'info.picocli' artifactId bintrayPackage version "$projectVersion" - pom.withXml { - def root = asNode() - root.appendNode('packaging', 'jar') - root.appendNode('name', bintrayPackage) - root.appendNode('description', description) - root.appendNode('url', 'http://picocli.info') - root.appendNode('inceptionYear', '2019') - root.children().last() + pomConfig + pom { + packaging = 'jar' + name = bintrayPackage + description = project.description + url = 'http://picocli.info' + inceptionYear = '2019' } + pom pomConfig } } }