You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by Alex Herbert <al...@gmail.com> on 2022/09/28 12:24:44 UTC

[parent][release][rng] Issue with release plugin multi-module builds

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 <ga...@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

Re: [parent][release][rng] Issue with release plugin multi-module builds

Posted by Thomas Vandahl <tv...@apache.org>.
> Am 28.09.2022 um 14:24 schrieb Alex Herbert <al...@gmail.com>:
> 
> 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

Same problem here with JCS. Is it possible to skip the commons-release-plugin steps altogether? I don't need them.

Bye, Thomas 
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Re: [parent][release][rng] Issue with release plugin multi-module builds

Posted by Gilles Sadowski <gi...@gmail.com>.
Le mer. 28 sept. 2022 à 14:25, Alex Herbert <al...@gmail.com> a écrit :
>
> 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 <ga...@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.

Based on your description of what the property does (when set to
"true"), it looks like it should be "false" by default because
  1. there is no need to duplicate the release notes in all modules,
  2. the release process includes the creating the release notes (at
      the root of the component's repository)

> If we wish to keep these in CP

---CUT---
    <commons.release.isDistModule>true</commons.release.isDistModule>
    <commons.releaseManagerName>Gary Gregory</commons.releaseManagerName>
    <commons.releaseManagerKey>86fdc7e2a11262cb</commons.releaseManagerKey>
---CUT---

IMO, none of the above should have a default value that could behave
in unintended ways; it might (?) be right to set them to empty, and ensure
that the release plugin (or whatever process that purports to use them)
fails loudly in that case.
[Reminder: Another example of silent failure is the script purporting to
download the artefacts and verify the checksums,  that reports "success"
even if it did not download anything.]

Regards,
Gilles

> 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

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org