使用Maven发布插件autoVersionSubmodules增加主要版本 [英] Using maven release plugin autoVersionSubmodules to increment Major version

查看:331
本文介绍了使用Maven发布插件autoVersionSubmodules增加主要版本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在hudson上使用maven版本插件,并将autoVersionSubmodules设置为true,以自动增加poms中的开发版本.

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.

当前,当我使用1.1.0版快照时,下一个版本设置为1.1.1版快照,但理想情况下,我希望将其更改为1.2.0版快照.

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?

谢谢.

推荐答案

maven版本插件提示您输入要标记的发行版本的值以及下一个开发版本.您可以定义这些内容以避免提示;通常,您可以在命令行中使用mvn -DreleaseVersion=1.1.0 -DdevelopmentVersion=1.2.0-SNAPSHOT之类的设置它们.

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.

但是,如果没有提示您选择版本,则说明正在为您选择.如果您正在使用适用于Hudson的M2版本插件,那么我认为它具有为您选择版本的选项,但是您可能应该找到一种显式配置它们的方法.有关您的特定设置的更多详细信息会有所帮助.

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.

这篇关于使用Maven发布插件autoVersionSubmodules增加主要版本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆