我正在使用Versions Maven插件来更新我的项目版本。
我正在使用mvn versions:use-latest-versions
来更新项目依赖项。但这忽略了设置为属性的版本。
例如,我的pom定义如下:
<properties>
<vertx.version>3.5.0</vertx.version>
</properties>
<dependency>
<groupId>io.vertx</groupId>
<artifactId>vertx-dependencies</artifactId>
- <version>${vertx.version}</version> <!-- This is replaced as below -->
+ <version>3.5.1</version>` <!-- How to ignore this change? -->
<type>pom</type>
<scope>import</scope>
</dependency>
我想更新属性中的版本而不是依赖项部分。
我可以使用mvn versions:update-properties
来更新属性。
问题是我想结合两个目标来更新属性。
一个接一个地执行2个目标也无济于事。
答案 0 :(得分:0)
可以使用mvn versions:update-properties
和mvn versions:use-latest-releases
连续而不是mvn versions:use-latest-versions
来实现所需的行为。