0

I have a multi-module project where all modules are in the same directory as the "aggregator" module. The aggregator is NOT the parent of the modules, it's only there to spread any maven command to modules, but there is no inheritance.

When I do this (maven-release-plugin command) in the aggregator directory :

mvn --batch-mode release:update-versions -DdevelopmentVersion=1.1.1-SNAPSHOT -DautoVersionSubmodules=true

It does change the version of all modules, but when I do this :

mvn versions:set -DnewVersion=1.1.1-SNAPSHOT

It does not, it changes only the aggregator module version.

Note : I know when you have a parent-child relationship between aggregator and modules you don't meet this problem.

Tristan
  • 8,733
  • 7
  • 48
  • 96
  • If you are already using release plugin why do you need versions-maven-plugin? – khmarbaise Mar 20 '17 at 16:44
  • Because it's buggy, especially when you are using a flat directory layout and when you are using Git. But if versions-maven-plugin is just as buggy, I won't be able to do the transition described here : https://axelfontaine.com/blog/final-nail.html – Tristan Mar 21 '17 at 09:38
  • Which version of maven-release-plugin do you use? Apart from that please open a issue against the maven-release-plugin... And why do you need to use a flat directory layout instead of the hierarchically? – khmarbaise Mar 21 '17 at 11:29
  • There are already multiple issues open about this from years ago, they just don't care. There was some workaround though (using push/fetch URL as developerConnection). About versions-maven-plugin, I've opened this one : https://github.com/mojohaus/versions-maven-plugin/issues/136 – Tristan Mar 22 '17 at 15:31
  • And about the flat layout, I add the aggregator (non-parent) module only when I need it, after my app has spread on multiple modules, and Maven allows this so I shouldn't have to anticipate this nor to have to "git mv" everything and probably lose code history. – Tristan Mar 22 '17 at 15:36
  • Sorry to say that. You are not answering questions. Which version of maven-release-plugin and versions-maven-plugin are you using? Furthermore if you see there is a problem why not offering a patch and active helping to solve a problem. You have opened an [issue](https://github.com/mojohaus/versions-maven-plugin/issues/136) but this references to two year old informations (old version of versions-maven-plugin) and does not contain an example project which shows the wrong behaviour... – khmarbaise Mar 22 '17 at 21:13
  • Why harrass me with this man ? can't u assume I'm using the latest version if u have the intent to try to reproduce ? I tried with 2.5.1 and 2.5.3 for Maven release plugin, see this : http://stackoverflow.com/questions/42863170/maven-release-plugin-incompatible-with-gitlab-groups and as I say, there are workarounds for this bug so my concern is about versions-maven-plugin (YES LATEST VERSION TOO !). This issue I've opened give all necessary informations for someone who has time and competences to correct the plugin (which I have not) and yes, it gives an example project. – Tristan Mar 22 '17 at 22:29

0 Answers0