Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Duplicate
-
2.4.2
-
None
-
None
Description
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:
<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>
<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>
Then, when you run
mvn -DdevelopmentVersion=1.1-SNAPSHOT -DautoVersionSubmodules=true release:update-versions
The dependent-pom.xml will be incorrect:
<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>
Notice that dependency's version is still 1.0-SNAPSHOT
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
Attachments
Issue Links
- duplicates
-
MRELEASE-555 update versions does not update intermodule dependencies
- Closed