Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
473 views
in Technique[技术] by (71.8m points)

hudson - Using maven release plugin autoVersionSubmodules to increment Major version

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.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...