我正在尝试使用 Maven 版本插件,但被导致插件无法在公司发布工件存储库中找到发布工件的问题阻止。演示该问题的测试 POM 的一部分...
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.xxxx.sage</groupId>
<artifactId>sage-core-health</artifactId>
<version>1.36-SNAPSHOT</version>
</dependency>
</dependencies>
</dependencyManagement>
<repositories>
<repository>
<id>releases</id>
<url>http://releases.dev.xxxx.org/archiva/repository/releases</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
<releases>
<enabled>true</enabled>
</releases>
</repository>
</repositories>
如果我执行versions:force-releases
,则工件版本号不会更新。Maven 记录以下...
[DEBUG] Looking for a release of org.xxxx.sage:sage-core-health:jar:1.36-SNAPSHOT
[DEBUG] Skipping update check for artifact org.xxxx.sage:sage-core-health (C:\Users\williams\.m2\repository\org\xxxx\sage\sage-core-health\maven-metadata-releases.xml) from disabled repository releases (http://releases.dev.xxxx.org/archiva/repository/releases)
[DEBUG] Skipping update check for artifact org.xxxx.sage:sage-core-health (C:\Users\williams\.m2\repository\org\xxxx\sage\sage-core-health\maven-metadata-central.xml) from disabled repository central (https://repo.maven.apache.org/maven2)
[INFO] No release of org.xxxx.sage:sage-core-health:jar:1.36-SNAPSHOT to force.
版本 1.36 肯定在发布工件存储库中。如果我更改存储库定义以启用快照并执行相同的目标,则工件版本号会正确更新为 1.36。
我一直试图让这个插件工作好几天,但是当我为 SNAPSHOT 启用它时,它似乎只能在发布工件存储库中找到发布工件......
<repositories>
<repository>
<id>releases</id>
<url>http://releases.dev.xxxx.org/archiva/repository/releases</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
<releases>
<enabled>true</enabled>
</releases>
</repository>
</repositories>
我究竟做错了什么?
谢谢