maven分支有批处理模式命令吗?
我有一个包含模块列表的父 pom。每个模块都有一个
I have a parent pom with list of modules. Each module has a <parent> section with version number of a parent.
First I do a release, which creates tag with version without SNAPSHOT and then I want to create a branch from that tag. The problem is that maven keeps asking about version number for each module. Is there a way to make maven set all modules to the same version?
Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
如果您使用的是发布插件,并且“发布”的意思是运行
,那么您可以添加 autoVersionSubmodules 标志,如下所示:
这会将所有子项目的版本设置为您接受的父项目版本。或者,如果您只想接受所有默认值,则可以使用 --batch-mode 选项。请参阅 http://maven.apache.org/ plugins/maven-release-plugin/examples/non-interactive-release.html 了解详细信息。
If you're using the release plugin, and by 'do a release' you mean run
then you can add the autoVersionSubmodules flag, as follows:
This will set the version of all your child projects to the version you accept for the parent. Or if you just want to accept all the defaults, you can use the --batch-mode option. See http://maven.apache.org/plugins/maven-release-plugin/examples/non-interactive-release.html for details.
您可以使用 release:branch 目标而不是发布:准备
You can use release:branch goal instead of release:prepare