M3 Version Maven Plugin provides a update-module goal that can be used to update the version of a module and of all dependant modules.
This plugin works with the "Major.Minor.Patch" Semantic Versioning.
To use this plugin, clone and compile it via
mvn installThen add to the plugin section of the POM of your Maven Project
[...]
<plugin>
<groupId>it.kiuiras.maven.plugin</groupId>
<artifactId>m3version-maven-plugin</artifactId>
<version>0.0.1-SNAPSHOT</version>
</plugin>
[...]
Run the update-module goal via
mvn m3version:update-moduleBy default, the update-module goal increment the Patch number of the version. You can also decide to increment Major or Minor number by versionType variable. For example:
mvn m3version:update-module -DversionType=MAJORIt is also possible to configure if the plugin should update the version of the parent of an updated module or not via the updateParent variable (default is true):
mvn m3version:update-module -DupdateParent=false