Use a maven property revision in the root pom as the single definition
of the project version for all modules.
This way, child maven modules don't need to specify parent project version.
This has two main advantages:
Changing the project version is achieved by modifying only the root
pom (the revision property).
Modules in feature branches created in a version prior to the latest
in the upstream branch don't get outdated when rebased/merged.
And one drawback:
mvn versions:set will still modify all the poms,
despite it asking "Enter the new version to set ${revision}:".
So just change the revision property manually, not a big deal.
Use a maven property
revision
in the root pom as the single definition of the project version for all modules.This way, child maven modules don't need to specify parent project version.
This has two main advantages:
revision
property).And one drawback:
mvn versions:set
will still modify all the poms, despite it asking "Enter the new version to set ${revision}:". So just change the revision property manually, not a big deal.See https://maven.apache.org/maven-ci-friendly.html for more information.