Using maven release plugin autoVersionSubmodules to increment Major version

Arya picture Arya · Apr 5, 2011 · Viewed 9.4k times · Source

I'm using the maven release plugin on hudson with autoVersionSubmodules set to true to automatically increment the development version in the poms.

I'm wondering if there is a way to make the plugin increment the major version rather than minor version.

Currently when I'm at version 1.1.0-snapshot the next version is set to 1.1.1-snapshot but ideally I would like it to change to 1.2.0-snapshot.

Any idea on how to achieve this?

Thanks.

Answer

Zac Thompson picture Zac Thompson · Apr 6, 2011

The maven release plugin prompts you for the values of the release version to tag and also for the next development version. You can define these to avoid prompting; usually you would set them at the command line with something like mvn -DreleaseVersion=1.1.0 -DdevelopmentVersion=1.2.0-SNAPSHOT.

However, if you are not getting prompted to select the version, then something is choosing for you. If you are using the M2 Release Plugin for Hudson then I think it has options to select the version for you, but you should probably find a way to configure them explicitly. More details about your particular setup would help.