Maven update-versions is a handy goal to increment version number of a project. This is especially useful for large multi-module maven projects.
mvn release:update-versionsThe above command prompts for the new version for each module in the project. The prompts can be avoided by using the option autoVersionSubmodules. This will set each module version to be same as the parent POM.
mvn releae:update-versions -DautoVersionSubmodules=trueThe goal can be run in non-interactive mode using batch-mode.
mvn --batch-mode release:update-versionsAbove command will auto increment the version without prompts. A specific version can also be specified:
mvn --batch-mode release:update-versions -DdevelopmentVersion=1.1-SNAPSHOT
No comments:
Post a Comment