In some situations you may want an easy way to update the version numbers in each POM of a multi-module project. The update-versions goal is designed to accomplish this.
To update the version numbers in your POMs, run:
mvn release:update-versions
You will be prompted for the version number for each module of the project. If you prefer that each module version be the same as the parent POM, you can use the option autoVersionSubmodules.
mvn release:update-versions -DautoVersionSubmodules=true
In this case you will only be prompted for the desired version number once.
You may want to specify the version(s) to use on the command line. This can be useful for example if you are running the update in non-interactive mode. The update-versions goal can use the same properties used by the prepare goal for specifying the versions to be used.
mvn --batch-mode release:update-versions -DdevelopmentVersion=1.2.0-SNAPSHOT
In this example, the local POM will be set to the version 1.2.0-SNAPSHOT