Maven版本插件跳过更新检查

Eng*_*_DJ 6 nexus maven-3 maven

当我尝试使用versions:use-releases我的版本库时,标记为"已禁用",这意味着快照依赖项无法解析为版本.我不明白为什么存储库被视为禁用.

以下是构建的缩写调试输出:

[DEBUG]   (f) remoteArtifactRepositories = [       id: snapshots
      url: http://maven.live.hostname.net/content/repositories/snapshots/
   layout: default
snapshots: [enabled => true, update => daily]
 releases: [enabled => true, update => daily]
,        id: company-nexus
      url: http://maven.live.hostname.net/content/groups/public/
   layout: default
snapshots: [enabled => false, update => daily]
 releases: [enabled => true, update => daily]
]
[...]
[DEBUG] Looking for a release of promotion-test-central:promotion-test-central:jar:1.6.0-SNAPSHOT
[INFO] artifact promotion-test-central:promotion-test-central: checking for updates from snapshots
[DEBUG] Reading resolution-state from: /home/tester/.m2/repository/promotion-test-central/promotion-test-central/resolver-status.properties
[DEBUG] Writing resolution-state to: /home/tester/.m2/repository/promotion-test-central/promotion-test-central/resolver-status.properties
[DEBUG] Skipping update check for artifact promotion-test-central:promotion-test-central (/home/tester/.m2/repository/promotion-test-central/promotion-test-central/maven-metadata-company-nexus.xml) from disabled repository company-nexus (http://hostname/content/groups/public/)
Run Code Online (Sandbox Code Playgroud)

我运行一个设置,将请求镜像central到我们的Nexus实例,并且还指定了一个全局快照存储库:

    <mirrors>
        <mirror>
            <id>mendeley-nexus</id>
            <mirrorOf>central</mirrorOf>
            <url>http://maven.live.chonp.net/content/groups/public/</url>
        </mirror>
    </mirrors>
    <profiles>
        <profile>
            <id>default</id>
            <repositories>
                <repository>
                    <id>snapshots</id>
                    <url>http://maven.live.chonp.net/content/repositories/snapshots/</url>
                    <snapshots>
                        <enabled>true</enabled>
                    </snapshots>
                </repository>
            </repositories>
        </profile>
    </profiles>
    <activeProfiles>
        <activeProfile>default</activeProfile>
    </activeProfiles>
Run Code Online (Sandbox Code Playgroud)

存在所讨论的依赖项的发布和快照版本,并且存储库在所有其他方面完全按预期工作.

Man*_*ser 3

您的 settings.xml 文件应按照 Nexus 书中的说明进行配置。你的配置不会工作,因为它只部分覆盖了 Maven 的 super pom。