From 51b7410fc46867a023de006d10f4678bd9a34d8c Mon Sep 17 00:00:00 2001 From: Marko Mackic Date: Sun, 17 Oct 2021 21:33:45 +0200 Subject: [PATCH] Revert "chore: use type-safe DSL instead of direct XML manipulation for pom.xml" This reverts commit 3617edc8226706ea8db4f34bd9aa6234ac8fb7f1. --- build.gradle | 35 ++++++++++++------------ picocli-codegen/build.gradle | 15 +++++----- picocli-groovy/build.gradle | 15 +++++----- picocli-shell-jline2/build.gradle | 15 +++++----- picocli-shell-jline3/build.gradle | 15 +++++----- picocli-spring-boot-starter/build.gradle | 15 +++++----- 6 files changed, 58 insertions(+), 52 deletions(-) diff --git a/build.gradle b/build.gradle index 0d88c0b90..dc8f4b370 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, as per https://docs.gradle.org/current/userguide/publishing_maven.html#sec:modifying_the_generated_pom + // pom configuration for MavenPublication 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,14 +442,15 @@ publishing { groupId 'info.picocli' artifactId bintrayPackage version "$projectVersion" - pom { - packaging = 'jar' - name = 'picocli - a mighty tiny Command Line Interface' - description = project.description - url = 'http://picocli.info' - inceptionYear = '2017' + 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 pomConfig } } } diff --git a/picocli-codegen/build.gradle b/picocli-codegen/build.gradle index 2ed697c72..b55fbadf4 100644 --- a/picocli-codegen/build.gradle +++ b/picocli-codegen/build.gradle @@ -93,14 +93,15 @@ publishing { groupId 'info.picocli' artifactId bintrayPackage version "$projectVersion" - pom { - packaging = 'jar' - name = bintrayPackage - description = project.description - url = 'http://picocli.info' - inceptionYear = '2018' + 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 pomConfig } } } diff --git a/picocli-groovy/build.gradle b/picocli-groovy/build.gradle index 733e27ee8..7a9b83140 100644 --- a/picocli-groovy/build.gradle +++ b/picocli-groovy/build.gradle @@ -93,14 +93,15 @@ publishing { groupId 'info.picocli' artifactId bintrayPackage version "$projectVersion" - pom { - packaging = 'jar' - name = bintrayPackage - description = project.description - url = 'http://picocli.info' - inceptionYear = '2018' + 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 pomConfig } } } diff --git a/picocli-shell-jline2/build.gradle b/picocli-shell-jline2/build.gradle index 13ab6dfae..67129c902 100644 --- a/picocli-shell-jline2/build.gradle +++ b/picocli-shell-jline2/build.gradle @@ -76,14 +76,15 @@ publishing { groupId 'info.picocli' artifactId bintrayPackage version "$projectVersion" - pom { - packaging = 'jar' - name = bintrayPackage - description = project.description - url = 'http://picocli.info' - inceptionYear = '2018' + 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 pomConfig } } } diff --git a/picocli-shell-jline3/build.gradle b/picocli-shell-jline3/build.gradle index e6f35eb11..b0f4e199b 100644 --- a/picocli-shell-jline3/build.gradle +++ b/picocli-shell-jline3/build.gradle @@ -79,14 +79,15 @@ publishing { groupId 'info.picocli' artifactId bintrayPackage version "$projectVersion" - pom { - packaging = 'jar' - name = bintrayPackage - description = project.description - url = 'http://picocli.info' - inceptionYear = '2018' + 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 pomConfig } } } diff --git a/picocli-spring-boot-starter/build.gradle b/picocli-spring-boot-starter/build.gradle index 3098467d8..73aca3854 100644 --- a/picocli-spring-boot-starter/build.gradle +++ b/picocli-spring-boot-starter/build.gradle @@ -82,14 +82,15 @@ publishing { groupId 'info.picocli' artifactId bintrayPackage version "$projectVersion" - pom { - packaging = 'jar' - name = bintrayPackage - description = project.description - url = 'http://picocli.info' - inceptionYear = '2019' + 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 pomConfig } } }