I am receiving a strange error when performing a dry-run release build of
the multi-module RNG project.

mvn -Duser.name=aherbert -Dcommons.release.dryRun=true -Ptest-deploy
-Prelease clean verify site deploy -Dgpg.skip

I get the following error:

[INFO] --- commons-release-plugin:1.8.0:stage-distributions
(stage-distributions) @ commons-rng-core ---
[INFO] Preparing to stage distributions
[INFO] Checking out dist from: scm:svn:
https://dist.apache.org/repos/dist/dev/commons/rng
Executing: /bin/sh -c cd
'/data/git/commons-rng/commons-rng-core/target/commons-release-plugin' &&
'svn' '--username' 'aherbert' '--n
o-auth-cache' '--non-interactive' 'checkout' '
https://dist.apache.org/repos/dist/dev/commons/rng@'
'/data/git/commons-rng/commons-rng
-core/target/commons-release-plugin/scm'
[INFO] Copying RELEASE-NOTES.txt to working directory.
[ERROR] Unable to copy file
/data/git/commons-rng/commons-rng-core/RELEASE-NOTES.txt tp
/data/git/commons-rng/commons-rng-core/target
/commons-release-plugin/scm/1.4-RC1/RELEASE-NOTES.txt: File
/data/git/commons-rng/commons-rng-core/RELEASE-NOTES.txt does not exist

The plugin is apparently looking to collate release notes in a child
module. This occurs in the second child module (not the first).

I have tracked this error down to a recent commit in parent that added
properties for the release plugin when preparing the CP 54 release:

commit efd8232f4811706ad21bc3583e32d2473256b8d8
Author: Gary Gregory <garydgreg...@gmail.com> 2022-09-18 16:24:01

diff --git a/pom.xml b/pom.xml
index 0e7a6e3..3d4bdb8 100644
--- a/pom.xml
+++ b/pom.xml
@@ -92,8 +92,12 @@

 
<project.build.outputTimestamp>2022-09-18T13:49:41Z</project.build.outputTimestamp>
     <commons.release.version>${project.version}</commons.release.version>
     <commons.rc.version>RC1</commons.rc.version>
-    <commons.bc.version>53</commons.bc.version>
     <commons.jira.id>COMMONSSITE</commons.jira.id>
+    <!-- Commons Release Plugin -->
+    <commons.bc.version>53</commons.bc.version>
+    <commons.release.isDistModule>true</commons.release.isDistModule>
+    <commons.releaseManagerName>Gary Gregory</commons.releaseManagerName>

+    <commons.releaseManagerKey>86fdc7e2a11262cb</commons.releaseManagerKey>

     <!-- Default configuration for compiler source and target JVM -->
     <!-- Do NOT change this; it must remain as 1.3 -->


These properties are used by all child projects. It is likely that some are
overridden when performing a release
(commons.bc.version, commons.releaseManagerName, commons.releaseManagerKey).
But the commons.release.isDistModule may not be overridden.

In RNG this property is overridden in the first child module to false. All
the other child modules do not override this property. Hence the build
error occuring on the second module. The property is then set to true in
the dist-archive module.

So CP 53 behaviour was for this flag to be false. Now in CP 54 this flag is
true. Thus all multi-module builds should set this flag to false in all
non-distribution modules.

Q. Should these properties be present in CP? They have never been there
before.

If we wish to keep these in CP then can I check that the flag should only
be used in one module of a multi-module build. I have verified that if I
set this flag to false in the RNG multi-module parent pom (it is set to
true in the dist-archive module) then the release dry run works.

Alex

Reply via email to