I have a multi-module project.
parent POM (1.0-SNAPSHOT) |-- module1 (1.0-SNAPSHOT) |-- module2 (1.0-SNAPSHOT) `-- module3 (1.0-SNAPSHOT)
When I execute mvn release:prepare it verify that parent POM has a SNAPSHOT version and all dependent modules don’t have a SNAPSHOT version. How automatically update all child modules from SNAPSHOT to the next release version?
I would like automatically increment version for all modules.
The release plugin can handle that. Did you check Updating POM Versions? But…
I don’t get something. Changing the version in the POMs from x-SNAPSHOT to a new version and bumping the version in the POMs to a new value y-SNAPSHOT should be done by
release:prepareas explained in Prepare a Release. What is going wrong when using this goal?Update: The
autoVersionSubmodulesparameter might be what you’re looking for. From the Prepare a Release example:Snippet of parent pom.xml