[ https://issues.apache.org/jira/browse/MRELEASE-1151?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17864766#comment-17864766 ]
Basil Crow edited comment on MRELEASE-1151 at 7/10/24 6:38 PM: --------------------------------------------------------------- Some of the questions raised above seem to be answered in [https://github.com/apache/maven-release/pull/202] by [~kolemik]. With one exception, that PR resolves this issue, and I think [https://github.com/apache/maven-release/pull/201] should not have been released without also including [https://github.com/apache/maven-release/pull/202]. I would recommend that the next release either include [https://github.com/apache/maven-release/pull/202] or revert [https://github.com/apache/maven-release/pull/201]. The exception is as follows. With the changes from [https://github.com/apache/maven-release/pull/202], {{<version>}} was left untouched ({{{}<version>${revision}${changelist}</version>{}}}) as expected, {{<revision>}} was left untouched (2.466) as expected, and {{<changelist>-SNAPSHOT</changelist>}} was changed to {{{}<changelist></changelist>{}}}, which results in the (correct) interpolated version of {{{}2.466{}}}. The only issue I had was that this then failed my Spotless checks when running the preparation goals: {noformat} Failed to execute goal com.diffplug.spotless:spotless-maven-plugin:2.43.0:check (default) on project simple-maven-project-with-tests: The following files had format violations: pom.xml @@ -25,7 +25,7 @@ ····</distributionManagement> ····<properties> ········<revision>1.40</revision> -········<changelist></changelist> +········<changelist·/> ········<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> ········<maven.compiler.source>17</maven.compiler.source> ········<maven.compiler.target>17</maven.compiler.target> Run 'mvn spotless:apply' to fix these violations. {noformat} Since the Jenkins project took its Spotless configuration from the Maven project, I would expect this to be an issue for the Maven project's release as well, should [https://github.com/apache/maven-release/pull/202] be released in its current form. In any case, this can be easily dealt with by skipping Spotless during the preparation phase with {{-Dspotless.check.skip}}. was (Author: basil): Some of the questions raised above seem to be answered in [https://github.com/apache/maven-release/pull/202] by [~kolemik]. With one exception, that PR resolves this issue, and I think [https://github.com/apache/maven-release/pull/201] should not have been released without also including [https://github.com/apache/maven-release/pull/202]. I would recommend that the next release either include [https://github.com/apache/maven-release/pull/202] or revert [https://github.com/apache/maven-release/pull/201]. The exception is as follows. With the changes from [https://github.com/apache/maven-release/pull/202], {{<version>}} was left untouched ({{{}<version>${revision}${changelist}</version>{}}}) as expected, {{<revision>}} was left untouched (2.466) as expected, and {{<changelist>-SNAPSHOT</changelist>}} was changed to {{{}<changelist></changelist>{}}}, which results in the (correct) interpolated version of {{{}2.466{}}}. The only issue I had was that this then failed my Spotless checks when running the preparation goals: {noformat} Failed to execute goal com.diffplug.spotless:spotless-maven-plugin:2.43.0:check (default) on project simple-maven-project-with-tests: The following files had format violations: pom.xml @@ -25,7 +25,7 @@ ····</distributionManagement> ····<properties> ········<revision>1.40</revision> -········<changelist></changelist> +········<changelist·/> ········<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> ········<maven.compiler.source>17</maven.compiler.source> ········<maven.compiler.target>17</maven.compiler.target> Run 'mvn spotless:apply' to fix these violations. {noformat} Since the Jenkins project took its Spotless configuration from the Maven project, I would expect this to be an issue for the Maven project's release as well, should [https://github.com/apache/maven-release/pull/202] be released in its current form. > Maven Release Plugin fails to adjust version (regression in 3.1.0) > ------------------------------------------------------------------ > > Key: MRELEASE-1151 > URL: https://issues.apache.org/jira/browse/MRELEASE-1151 > Project: Maven Release Plugin > Issue Type: Bug > Components: prepare > Affects Versions: 3.1.0 > Environment: Ubuntu 22.04.4 LTS x86_64 > Reporter: Basil Crow > Priority: Blocker > > h3. Steps to reproduce > # Run {{git clone [https://github.com/jenkinsci/text-finder-plugin.git]}} > # Using Java 17 and Maven 3.9.8, run {{mvn release:prepare > -DpushChanges=false}} > h3. Expected results > {panel:title=Note} > These are the _actual_ results with Maven Release Plugin 3.0.1. > {panel} > The {{[maven-release-plugin] prepare release}} commit adjusts > {{<tag>${scmTag}</tag>}} to e.g. {{<tag>text-finder-1.29</tag>}} *and* > adjusts {{<version>${revision}${changelist}</version>}} to e.g. > {{{}<version>1.29</version>{}}}. > h3. Actual results > Starting with Maven Release Plugin 3.1.0, the {{[maven-release-plugin] > prepare release}} commit still adjusts {{<tag>${scmTag}</tag>}} to e.g. > {{{}<tag>text-finder-1.29</tag>{}}}, but it *fails to adjust* > {{<version>${revision}${changelist}</version>}} to e.g. > {{<version>1.29</version>}} as expected. After this, the release subsequently > fails. > h3. Evaluation > This regression is caused by the changes to {{AbstractRewritePomsPhase}} made > in MRELEASE-1109. When these changes are reverted, the issue is resolved. > h3. Note > This caused the weekly Jenkins core release to fail on July 2, 2024. We have > downgraded Maven Release Plugin to 3.0.1 in order to restore stability to our > releases. -- This message was sent by Atlassian Jira (v8.20.10#820010)