I have a big multi-module maven project (tens of modules, 4 nesting levels).
Every module has it's own semantic version (can be SNAPSHOT
or not).
I want to find the way to bump every module major version automatically with one command or script to avoid changes in every module.
So I have for example
parent POM (1.2.3-SNAPSHOT) |-- api-module (3.4.5) |-- impl-module (5.6.7-SNAPSHOT) |-- another-parent-module (1.0.1-SNAPSHOT) |--|--sub-module1 (1.2.3) |--|--sub-module2 (2.3.4)
and after bumping I want to have
parent POM (2.0.0-SNAPSHOT) |-- api-module (4.0.0) |-- impl-module (6.0.0-SNAPSHOT) |-- another-parent-module (2.0.0-SNAPSHOT) |--|--sub-module1 (2.0.0) |--|--sub-module2 (3.0.0)
I know about Maven Release Plugin and about Versions Maven Plugin but I can't figure out how to make them bump major version automatically.
Could you help me with this problem?
mvn versions:set -DnewVersion=13.5.6.
– khmarbaise