[ https://issues.apache.org/jira/browse/MRELEASE-932?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17377251#comment-17377251 ]
Andreas Dangel commented on MRELEASE-932: ----------------------------------------- I have a reproduction case with a minimal project. It is not a multi-module, so might not be the exact issue. But it's very similar: [^MRELEASE-932.zip] (See README.md inside for reproduction steps) The property "myapp.version.previous" points to a different version than the one that is being released - so it should not be needed to be modified in any way. I would expect, that this property is then just left as it is. The property is introduced, so that it can be set easily from outside (-Dmyapp.version.previous=...). > ReleaseFailureException of an artefact wich version as a property > ----------------------------------------------------------------- > > Key: MRELEASE-932 > URL: https://issues.apache.org/jira/browse/MRELEASE-932 > Project: Maven Release Plugin > Issue Type: Bug > Components: prepare > Affects Versions: 2.5.1, 2.5.3 > Environment: Maven 3.2.1 > Windows 7 > Intel Core i7 > Reporter: Antoine > Priority: Major > Labels: bug > Attachments: MRELEASE-932.zip > > > After updating the release maven plugin from version 2.0.0 to 2.5.1, I've got > the following exception: > {quote} > message : Failed to execute goal > org.apache.maven.plugins:maven-release-plugin:2.5.1:prepare (default-cli) on > project ping-parent: The artifact (com.mycompagny.myapp:myapp-client) > requires a different version (15.4.0) than what is found (12.2.1) for the > expression (version.client.tested) in the project > (com.mycompagny.myapp:myapp-client). > cause : The artifact (com.mycompagny.myapp:myapp-client) requires a different > version (15.4.0) than what is found (12.2.1) for the expression > (version.client.tested) in the project (com.mycompagny.myapp:myapp-client). > Stack trace : > org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute > goal org.apache.maven.plugins:maven-release-plugin:2.5.1:prepare > (default-cli) on project ping-parent: The artifact > (fr.generali.gael.ping:ping-injection-client) requires a different version > (15.4.1-git) than what is found (15.4.0) for the expression > (version.client.tested) in the project > (fr.generali.gael.ping:ping-client-test). > at > org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:213) > at > org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153) > at > org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145) > at > org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java > {quote} > This error happens in a multi-module application. > For testing purpose, we depends from an older version of an artefact of the > same application. > When the artefact version is an expression (ie. $\{version.client.tested\}), > the > [AbstractRewritePomsPhase|http://grepcode.com/file/repo1.maven.org/maven2/org.apache.maven.release/maven-release-manager/2.5.1/org/apache/maven/shared/release/phase/AbstractRewritePomsPhase.java/#545] > class do a chek. > If we don't use the expression (i.e. properties), the release is working. > Maven configuration that fails: > {code} > <properties> > <version.client.tested>12.1.0</version.client.tested> > </properties> > <dependency> > <groupId>${project.groupId}</groupId> > <artifactId>myapp-client</artifactId> > <version>${version.client.tested}</version> > </dependency> > {code} > Maven configuration that is working: > {code} > <dependency> > <groupId>${project.groupId}</groupId> > <artifactId>myapp-client</artifactId> > <version>12.1.0</version> > </dependency> > {code} -- This message was sent by Atlassian Jira (v8.3.4#803005)