Java Maven版本插件:版本:使用版本不做任何事情
在发布之前,我需要更改项目的所有快照依赖项。我正在尝试使用命令行mvn versions:use releases中的版本:use releases,但它对我不起作用。我正在使用Nexus repository进行发布,发布版本已正确部署并具有公共访问权限Java Maven版本插件:版本:使用版本不做任何事情,java,maven,versions,versions-maven-plugin,Java,Maven,Versions,Versions Maven Plugin,在发布之前,我需要更改项目的所有快照依赖项。我正在尝试使用命令行mvn versions:use releases中的版本:use releases,但它对我不起作用。我正在使用Nexus repository进行发布,发布版本已正确部署并具有公共访问权限 <dependencyManagement> <dependencies> <dependency> <groupId>junit</groupId>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.11</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.efx.util</groupId>
<artifactId>efx-util</artifactId>
<version>0.0.1-SNAPSHOT</version>
</dependency>
</dependencies>
</dependencyManagement>
但是版本:显示依赖项更新会检测到相应的版本
------------------------------------------------------------------------
[INFO] Building efx-clientesocket-conf 0.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- versions-maven-plugin:2.2:display-dependency-updates (default-cli) @ efx-clientesocket-conf ---
[INFO] artifact junit:junit: checking for updates from nexus
[INFO] The following dependencies in Dependency Management have newer versions:
[INFO] com.efx.util:efx-util ................ 0.0.1-SNAPSHOT -> 1.0.0-RELEASE
[INFO] junit:junit ............................................. 4.11 -> 4.12
[INFO]
[INFO] ------------------------------------------------------------------------
我也在尝试不同的版本:使用最新版本作为替代,一切都会顺利。在本例中,我使用-Dincludes=来避免更新任何快照版本。但是,我希望使用版本:使用releases确保一次只更新属性中的所有快照版本和覆盖版本
我使用的Maven版本是3.3.1,插件版本是2.2
有人知道为什么不工作吗???1-版本:使用发布在pom中搜索所有已发布的快照版本,并将其替换为相应的发布版本
com.efx.util:efx-util ................ 0.0.1-SNAPSHOT -> 1.0.0-RELEASE
这意味着efx-util-0.0.1-SNAPSHOT
应该有相应的版本efx-util-0.0.1-Release
或efx-util-0.0.1
(0.0.1的发布版本),否则它将无法工作<代码>1.0.0-RELEASE不是相应的版本
------------------------------------------------------------------------
[INFO] Building efx-clientesocket-conf 0.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- versions-maven-plugin:2.2:display-dependency-updates (default-cli) @ efx-clientesocket-conf ---
[INFO] artifact junit:junit: checking for updates from nexus
[INFO] The following dependencies in Dependency Management have newer versions:
[INFO] com.efx.util:efx-util ................ 0.0.1-SNAPSHOT -> 1.0.0-RELEASE
[INFO] junit:junit ............................................. 4.11 -> 4.12
[INFO]
[INFO] ------------------------------------------------------------------------
2-版本:使用最新版本在pom中搜索更新版本的所有非快照版本,并将其替换为最新版本
com.efx.util:efx-util ................ 0.0.1-SNAPSHOT -> 1.0.0-RELEASE
在这种情况下,它不限于(0.0.1-SNAPSHOT)的相应版本。因此,该版本可能有不同的版本号(1.0.0-release)
希望这有帮助。是的!这对我有帮助。谢谢