从pom中的项目版本中删除-SNAPSHOT [英] Remove -SNAPSHOT from project version in pom
本文介绍了从pom中的项目版本中删除-SNAPSHOT的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有以下GAV的pom
I have a pom with the following GAV
<groupId>com.company.services</groupId>
<artifactId>test-branch-2</artifactId>
<version>1.0.21-SNAPSHOT</version>
我想在批处理模式下使用maven从其中删除-SNAPSHOT
,因此我可以使用Jenkins进行操作,而不必手动指定任何内容.
I want to remove -SNAPSHOT
from this using maven in batch mode, so I can do it with Jenkins and not have to specify anything manually.
我看过version:set的文档,但是所有选项都为我提供了一个交互式提示,并要求我输入版本名称.
I've looked at the documentation for version:set but all the options offer me an interactive prompt and ask me to type a name for the version.
我更喜欢版本插件,而不是发布插件.
I would prefer the versions plugin, not the release plugin.
推荐答案
自版本2.10的Maven插件起,您可以轻松进行以下操作:
Since version 2.10 of the Versions Maven Plugin you can simply do:
mvn versions:set -DremoveSnapshot
这篇关于从pom中的项目版本中删除-SNAPSHOT的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文