You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Robert Scholte (JIRA)" <ji...@apache.org> on 2015/04/06 11:35:12 UTC
[jira] [Closed] (MRELEASE-860) update-versions goal does not update
dependency versions
[ https://issues.apache.org/jira/browse/MRELEASE-860?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Robert Scholte closed MRELEASE-860.
-----------------------------------
Resolution: Duplicate
> update-versions goal does not update dependency versions
> --------------------------------------------------------
>
> Key: MRELEASE-860
> URL: https://issues.apache.org/jira/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.3.4#6332)