You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@geode.apache.org by rh...@apache.org on 2018/10/15 18:31:48 UTC
[geode] 01/02: Improve reporting in checkPom. Add task
updateExpectedPom to spare manual copy.
This is an automated email from the ASF dual-hosted git repository.
rhoughton pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/geode.git
commit 0d8f7d44196cff91fbb02885fe3c5b7c749ce587
Author: Patrick Rhomberg <pr...@pivotal.io>
AuthorDate: Thu Sep 27 14:09:03 2018 -0700
Improve reporting in checkPom. Add task updateExpectedPom to spare manual copy.
---
gradle/publish.gradle | 22 ++++++++++++++++++----
1 file changed, 18 insertions(+), 4 deletions(-)
diff --git a/gradle/publish.gradle b/gradle/publish.gradle
index f4eb8a0..8c93dec 100644
--- a/gradle/publish.gradle
+++ b/gradle/publish.gradle
@@ -163,12 +163,15 @@ subprojects {
def message =
"The ".concat(project.name).concat(" pom-default.xml has changed. Verify dependencies.")
- .concat("\nWhen fixed, copy ").concat(actualPomFile as String)
- .concat("\nto ").concat(expectedPomFile as String)
+ .concat("\nWhen changes have been approved, copy :\n")
+ .concat(" cp ").concat(actualPomFile as String)
+ .concat(" ").concat(expectedPomFile as String)
.concat("\nRemoved Dependencies\n--------------\n")
- .concat(String.join("\n", removedDependencies.toString()))
+ .concat(String.join("\n", removedDependencies.each { dep -> dep.toString() }))
.concat("\n\nNew Dependencies\n--------------\n")
- .concat(String.join("\n", newDependencies.toString()) + "\n\n")
+ .concat(String.join("\n", newDependencies.each { dep -> dep.toString() }))
+ .concat("\n\n")
+
throw new RuntimeException(message)
}
@@ -178,6 +181,17 @@ subprojects {
}
check.dependsOn('checkPom')
+ task updateExpectedPom(dependsOn: generatePomFileForMavenPublication, type: Copy) {
+ description 'After having verified changes with checkPom, this task will perform the copy.'
+
+ def expectedPomFile = sourceSets.test.resources.find() { it.name == "expected-pom.xml" }
+ def actualPomFile = generatePomFileForMavenPublication.outputs.files.first()
+ if (tasks.getByName("generatePomFileForMavenPublication").enabled && expectedPomFile && actualPomFile) {
+ from actualPomFile
+ into expectedPomFile.parent
+ rename '.*xml', "expected-pom.xml"
+ }
+ }
} // subprojects