[
https://jira.codehaus.org/browse/MRELEASE-860?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=354823#comment-354823
]
Mattias Jiderhamn commented on MRELEASE-860:
--------------------------------------------
This annoyed me too, but for me the workaround seems to be to use
${project.parent.version}
> update-versions goal does not update dependency versions
> --------------------------------------------------------
>
> Key: MRELEASE-860
> URL: https://jira.codehaus.org/browse/MRELEASE-860
> Project: Maven Release Plugin
> Issue Type: Bug
> Components: update-versions
> Affects Versions: 2.4.2
> Reporter: Alex Pogrebnyak
>
> When you run 'prepare-with-pom' goal, it will update snapshot version number
> on dependencies.
> Contrary to that behavior, update-versions, will only update parent's version.
> If you have these poms:
> {code:title=aggregator-pom.xml|borderStyle=solid}
> <artifactId>aggregator</artifactId>
> <parent>
> <groupId>my.group.id</groupId>
> <artifactId>parent</artifactId>
> <version>1.0-SNAPSHOT</version>
> <relativePath>parent/pom.xml</relativePath>
> </parent>
> <modules>
> <module>dependent</module>
> <module>dependency</module>
> </modules>
> {code}
> {code:title=dependent-pom.xml|borderStyle=solid}
> <artifactId>dependent</artifactId>
> <parent>
> <groupId>my.group.id</groupId>
> <artifactId>parent</artifactId>
> <version>1.0-SNAPSHOT</version>
> <relativePath>../parent/pom.xml</relativePath>
> </parent>
> <dependencies>
> <dependency>
> <groupId>my.group.id</groupId>
> <artifactId>dependency</artifactId>
> <version>1.0-SNAPSHOT</version>
> </dependency>
> </dependencies>
> {code}
> Then, when you run
> {code}
> mvn -DdevelopmentVersion=1.1-SNAPSHOT -DautoVersionSubmodules=true
> release:update-versions
> {code}
> The dependent-pom.xml will be incorrect:
> {code:title=dependent-pom-1.1.xml|borderStyle=solid|xml}
> <artifactId>dependent</artifactId>
> <parent>
> <groupId>my.group.id</groupId>
> <artifactId>parent</artifactId>
> <version>1.1-SNAPSHOT</version>
> <relativePath>../parent/pom.xml</relativePath>
> </parent>
> <dependencies>
> <dependency>
> <groupId>my.group.id</groupId>
> <artifactId>dependency</artifactId>
> <version>1.0-SNAPSHOT</version>
> </dependency>
> </dependencies>
> {code}
> Notice that dependency's version is still {{{color:red}1.0-SNAPSHOT{color}}}
> If I were to do {{release:prepare}} and {{release:perform}} the version would
> have been updated in both places to {{1.1-SNAPSHOT}}
> I expect the same behavior for {{release:update-versions}} as well.
> Just to state: I cannot use $\{project.version\}. And custom version
> property does not work because of MRELEASE-782
--
This message was sent by Atlassian JIRA
(v6.1.6#6162)