[ https://issues.apache.org/jira/browse/MRELEASE-1154?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17877136#comment-17877136 ]
Konrad Windszus edited comment on MRELEASE-1154 at 8/27/24 6:28 PM: -------------------------------------------------------------------- The version expression in https://github.com/apache/maven-surefire/blob/e99f11e1849b7a00ee9a6f6bb8cc362a14dd2d3c/surefire-api/pom.xml#L43 leads to the exception (because the dependency is part of the reactor to be released and therefore usually rewritten). was (Author: kwin): The version expression in https://github.com/apache/maven-surefire/blob/e99f11e1849b7a00ee9a6f6bb8cc362a14dd2d3c/surefire-api/pom.xml#L43 leads to the exception (because the dependency is part of the reactor to be released) and therefore usually rewritten. > [REGRESSION] MRELEASE-1109 breaks release of Maven Surefire > ----------------------------------------------------------- > > Key: MRELEASE-1154 > URL: https://issues.apache.org/jira/browse/MRELEASE-1154 > Project: Maven Release Plugin > Issue Type: Bug > Components: prepare > Affects Versions: 3.1.0, 3.1.1 > Reporter: Michael Osipov > Assignee: Michael Osipov > Priority: Major > Fix For: next-release > > > Upgraded Maven Surefire to Parent 43 and failed to prepare release with {{mvn > release:prepare -e}}: > {noformat} > [INFO] Ignoring artifact version update for expression ${project.version} > [INFO] > ------------------------------------------------------------------------ > [INFO] Reactor Summary for Apache Maven Surefire 3.5.1-SNAPSHOT: > [INFO] > [INFO] Apache Maven Surefire .............................. FAILURE [ 58.812 > s] > [INFO] Surefire Shared Utils .............................. SKIPPED > [INFO] Surefire Logger API ................................ SKIPPED > [INFO] Surefire API ....................................... SKIPPED > [INFO] Surefire Extensions API ............................ SKIPPED > [INFO] Surefire Extensions SPI ............................ SKIPPED > [INFO] Surefire Booter .................................... SKIPPED > [INFO] Maven Surefire Test-Grouping Support ............... SKIPPED > [INFO] Surefire Providers ................................. SKIPPED > [INFO] Shared JUnit3 Provider Code ........................ SKIPPED > [INFO] Shared Java 5 Provider Base ........................ SKIPPED > [INFO] Shared JUnit4 Provider Code ........................ SKIPPED > [INFO] Shared JUnit48 Provider Code ....................... SKIPPED > [INFO] Surefire JUnit Runner .............................. SKIPPED > [INFO] Surefire JUnit4 Runner ............................. SKIPPED > [INFO] Maven Surefire Common .............................. SKIPPED > [INFO] Surefire JUnitCore Runner .......................... SKIPPED > [INFO] Surefire JUnit Platform Runner ..................... SKIPPED > [INFO] Surefire TestNG Utils .............................. SKIPPED > [INFO] Surefire TestNG Runner ............................. SKIPPED > [INFO] ShadeFire JUnit3 Provider .......................... SKIPPED > [INFO] Surefire Report Parser ............................. SKIPPED > [INFO] Maven Surefire Plugin .............................. SKIPPED > [INFO] Maven Failsafe Plugin .............................. SKIPPED > [INFO] Maven Surefire Report Plugin ....................... SKIPPED > [INFO] Maven Surefire Integration Tests ................... SKIPPED > [INFO] > ------------------------------------------------------------------------ > [INFO] BUILD FAILURE > [INFO] > ------------------------------------------------------------------------ > [INFO] Total time: 01:02 min > [INFO] Finished at: 2024-08-23T11:32:04+02:00 > [INFO] > ------------------------------------------------------------------------ > [ERROR] Failed to execute goal > org.apache.maven.plugins:maven-release-plugin:3.1.0:prepare (default-cli) on > project surefire: Could not find properties resolving version expression : > ${surefire-shared-utils.version} -> [Help 1] > org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute > goal org.apache.maven.plugins:maven-release-plugin:3.1.0:prepare > (default-cli) on project surefire: Could not find properties resolving > version expression : ${surefire-shared-utils.version} > at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute2 > (MojoExecutor.java:333) > at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute > (MojoExecutor.java:316) > at org.apache.maven.lifecycle.internal.MojoExecutor.execute > (MojoExecutor.java:212) > at org.apache.maven.lifecycle.internal.MojoExecutor.execute > (MojoExecutor.java:174) > at org.apache.maven.lifecycle.internal.MojoExecutor.access$000 > (MojoExecutor.java:75) > at org.apache.maven.lifecycle.internal.MojoExecutor$1.run > (MojoExecutor.java:162) > at org.apache.maven.plugin.DefaultMojosExecutionStrategy.execute > (DefaultMojosExecutionStrategy.java:39) > at org.apache.maven.lifecycle.internal.MojoExecutor.execute > (MojoExecutor.java:159) > at > org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject > (LifecycleModuleBuilder.java:105) > at > org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject > (LifecycleModuleBuilder.java:73) > at > org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build > (SingleThreadedBuilder.java:53) > at org.apache.maven.lifecycle.internal.LifecycleStarter.execute > (LifecycleStarter.java:118) > at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:261) > at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:173) > at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:101) > at org.apache.maven.cli.MavenCli.execute (MavenCli.java:903) > at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:280) > at org.apache.maven.cli.MavenCli.main (MavenCli.java:203) > at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method) > at jdk.internal.reflect.NativeMethodAccessorImpl.invoke > (NativeMethodAccessorImpl.java:62) > at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke > (DelegatingMethodAccessorImpl.java:43) > at java.lang.reflect.Method.invoke (Method.java:566) > at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced > (Launcher.java:255) > at org.codehaus.plexus.classworlds.launcher.Launcher.launch > (Launcher.java:201) > at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode > (Launcher.java:361) > at org.codehaus.plexus.classworlds.launcher.Launcher.main > (Launcher.java:314) > Caused by: org.apache.maven.plugin.MojoFailureException: Could not find > properties resolving version expression : ${surefire-shared-utils.version} > at org.apache.maven.plugins.release.PrepareReleaseMojo.prepareRelease > (PrepareReleaseMojo.java:434) > at org.apache.maven.plugins.release.PrepareReleaseMojo.execute > (PrepareReleaseMojo.java:367) > at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo > (DefaultBuildPluginManager.java:126) > at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute2 > (MojoExecutor.java:328) > at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute > (MojoExecutor.java:316) > at org.apache.maven.lifecycle.internal.MojoExecutor.execute > (MojoExecutor.java:212) > at org.apache.maven.lifecycle.internal.MojoExecutor.execute > (MojoExecutor.java:174) > at org.apache.maven.lifecycle.internal.MojoExecutor.access$000 > (MojoExecutor.java:75) > at org.apache.maven.lifecycle.internal.MojoExecutor$1.run > (MojoExecutor.java:162) > at org.apache.maven.plugin.DefaultMojosExecutionStrategy.execute > (DefaultMojosExecutionStrategy.java:39) > at org.apache.maven.lifecycle.internal.MojoExecutor.execute > (MojoExecutor.java:159) > at > org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject > (LifecycleModuleBuilder.java:105) > at > org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject > (LifecycleModuleBuilder.java:73) > at > org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build > (SingleThreadedBuilder.java:53) > at org.apache.maven.lifecycle.internal.LifecycleStarter.execute > (LifecycleStarter.java:118) > at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:261) > at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:173) > at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:101) > at org.apache.maven.cli.MavenCli.execute (MavenCli.java:903) > at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:280) > at org.apache.maven.cli.MavenCli.main (MavenCli.java:203) > at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method) > at jdk.internal.reflect.NativeMethodAccessorImpl.invoke > (NativeMethodAccessorImpl.java:62) > at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke > (DelegatingMethodAccessorImpl.java:43) > at java.lang.reflect.Method.invoke (Method.java:566) > at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced > (Launcher.java:255) > at org.codehaus.plexus.classworlds.launcher.Launcher.launch > (Launcher.java:201) > at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode > (Launcher.java:361) > at org.codehaus.plexus.classworlds.launcher.Launcher.main > (Launcher.java:314) > Caused by: org.apache.maven.shared.release.ReleaseFailureException: Could not > find properties resolving version expression : > ${surefire-shared-utils.version} > at > org.apache.maven.shared.release.phase.AbstractRewritePomsPhase.rewriteArtifactVersions > (AbstractRewritePomsPhase.java:627) > at > org.apache.maven.shared.release.phase.AbstractRewritePomsPhase.transformDocument > (AbstractRewritePomsPhase.java:389) > at > org.apache.maven.shared.release.phase.AbstractRewritePomsPhase.transformProject > (AbstractRewritePomsPhase.java:260) > at > org.apache.maven.shared.release.phase.AbstractRewritePomsPhase.transform > (AbstractRewritePomsPhase.java:223) > at org.apache.maven.shared.release.phase.AbstractRewritePomsPhase.execute > (AbstractRewritePomsPhase.java:160) > at org.apache.maven.shared.release.DefaultReleaseManager.prepare > (DefaultReleaseManager.java:193) > at org.apache.maven.shared.release.DefaultReleaseManager.prepare > (DefaultReleaseManager.java:110) > at org.apache.maven.plugins.release.PrepareReleaseMojo.prepareRelease > (PrepareReleaseMojo.java:430) > at org.apache.maven.plugins.release.PrepareReleaseMojo.execute > (PrepareReleaseMojo.java:367) > at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo > (DefaultBuildPluginManager.java:126) > at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute2 > (MojoExecutor.java:328) > at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute > (MojoExecutor.java:316) > at org.apache.maven.lifecycle.internal.MojoExecutor.execute > (MojoExecutor.java:212) > at org.apache.maven.lifecycle.internal.MojoExecutor.execute > (MojoExecutor.java:174) > at org.apache.maven.lifecycle.internal.MojoExecutor.access$000 > (MojoExecutor.java:75) > at org.apache.maven.lifecycle.internal.MojoExecutor$1.run > (MojoExecutor.java:162) > at org.apache.maven.plugin.DefaultMojosExecutionStrategy.execute > (DefaultMojosExecutionStrategy.java:39) > at org.apache.maven.lifecycle.internal.MojoExecutor.execute > (MojoExecutor.java:159) > at > org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject > (LifecycleModuleBuilder.java:105) > at > org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject > (LifecycleModuleBuilder.java:73) > at > org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build > (SingleThreadedBuilder.java:53) > at org.apache.maven.lifecycle.internal.LifecycleStarter.execute > (LifecycleStarter.java:118) > at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:261) > at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:173) > at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:101) > at org.apache.maven.cli.MavenCli.execute (MavenCli.java:903) > at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:280) > at org.apache.maven.cli.MavenCli.main (MavenCli.java:203) > at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method) > at jdk.internal.reflect.NativeMethodAccessorImpl.invoke > (NativeMethodAccessorImpl.java:62) > at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke > (DelegatingMethodAccessorImpl.java:43) > at java.lang.reflect.Method.invoke (Method.java:566) > at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced > (Launcher.java:255) > at org.codehaus.plexus.classworlds.launcher.Launcher.launch > (Launcher.java:201) > at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode > (Launcher.java:361) > at org.codehaus.plexus.classworlds.launcher.Launcher.main > (Launcher.java:314) > [ERROR] > [ERROR] Re-run Maven using the -X switch to enable full debug logging. > [ERROR] > [ERROR] For more information about the errors and possible solutions, please > read the following articles: > [ERROR] [Help 1] > http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException > {noformat} > bisected down to: > {noformat} > osipovmi@deblndw011x:~/var/Projekte/maven-release ((9e0713b8...)|BISECTING) > $ git bisect bad > 9e0713b83d99723ebeb3e8347f3f69c69c585ed0 is the first bad commit > commit 9e0713b83d99723ebeb3e8347f3f69c69c585ed0 (HEAD) > Author: Konrad Windszus <k...@apache.org> > Date: 2023-08-20T16:28:20+02:00 > [MRELEASE-1109] Support CI friendly versions (#198) > .../maven/shared/release/phase/AbstractRewritePomsPhase.java | 150 > ++++++++++++++++++++---------- > .../apache/maven/shared/release/transform/jdom2/JDomModel.java | 17 +++- > .../apache/maven/shared/release/transform/jdom2/JDomParent.java | 2 +- > .../shared/release/phase/RewritePomsForReleasePhaseTest.java | 14 +++ > .../maven/shared/release/transform/jdom2/JDomModelTest.java | 9 +- > .../maven/shared/release/transform/jdom2/JDomParentTest.java | 11 ++- > .../pom-with-parent-and-cifriendly-expressions/expected-pom.xml | 39 > ++++++++ > .../pom-with-parent-and-cifriendly-expressions/pom.xml | 39 > ++++++++ > .../subproject1/expected-pom.xml | 28 > ++++++ > .../subproject1/pom.xml | 28 > ++++++ > 10 files changed, 282 insertions(+), 55 deletions(-) > create mode 100644 > maven-release-manager/src/test/resources/projects/rewrite-for-release/pom-with-parent-and-cifriendly-expressions/expected-pom.xml > create mode 100644 > maven-release-manager/src/test/resources/projects/rewrite-for-release/pom-with-parent-and-cifriendly-expressions/pom.xml > create mode 100644 > maven-release-manager/src/test/resources/projects/rewrite-for-release/pom-with-parent-and-cifriendly-expressions/subproject1/expected-pom.xml > create mode 100644 > maven-release-manager/src/test/resources/projects/rewrite-for-release/pom-with-parent-and-cifriendly-expressions/subproject1/pom.xml > {noformat} > Reverted the release locally on master and tried a snapshot. It does perform > the dry run as expected. We either need to fix or revert the commit. -- This message was sent by Atlassian Jira (v8.20.10#820010)