Maven的版本插件跳过更新检查(Maven Versions Plug-in Skipping U

2019-07-30 02:55发布

当我尝试使用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/)

我运行一个反映请求的设置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>

存在问题的相关性的释放和快照版本,并且存储库的工作原理完全如预期在所有其他方面。

Answer 1:

你的settings.xml文件应该被配置为Nexus的书中记载 。 你的配置不会工作,因为它只是部分覆盖的Maven的超级POM。



Answer 2:

我也碰到了这一点。 我能够做让过去吧:

    <repository>
        <id>my-snapshots</id>
        <url>https://nexus.corp.company.com/nexus/content/repositories/snapshots</url>
        <snapshots>
            <enabled>true</enabled>
        </snapshots>
        <releases>
            <enabled>true</enabled>
        </releases>
    </repository>

这是从先前具有出发:

        <releases>
            <enabled>false</enabled>
        </releases>

这似乎当Maven查找您当前构件的元数据的情况发生,并限制其搜索到只还可能包含神器回购。



文章来源: Maven Versions Plug-in Skipping Update Check