How to update modules versions ?

Upading multiple versions once can be done manually, with customized script or with Maven plugin called Versions. With this plugin, version change is made by executing set goal, as below:

mvn versions:set -DnewVersion=0.2-SNAPSHOT -DgenerateBackupPoms=false

After executing this command, output should be:

[INFO] Searching for local aggregator root...
[INFO] Local aggregation root: /home/bartosz/code/sandbox/waitingforcode
[INFO] Processing change of sandbox:waitingforcode.com:1.0-SNAPSHOT -> 1.1-SNAPSHOT
[INFO] Processing sandbox:waitingforcode.com
[INFO]     Updating project sandbox:waitingforcode.com
[INFO]         from version 1.0-SNAPSHOT to 1.1-SNAPSHOT

And, of course, version in pom.xml should change to 1.1-SNAPSHOT too.

Executed command contains an argument generateBackupPoms set to false. Thanks to it, we prevent Maven from creating backups of every changed pom.xml. The name of this backup file is pom.xml.versionsBackup).

Versions plugin is more powerful that it seems because it allows to control which modules should be updated (by groupId, artifactId) or if project parent should also be updated.