Maven版本插件跳过更新检查 [英] Maven Versions Plug-in Skipping Update Check

查看:561
本文介绍了Maven版本插件跳过更新检查的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

When I attempt to use versions:use-releases my release repository is marked as "disabled", meaning the snapshot dependencies do not get resolved to releases. I don't understand why the repository is considered disabled.

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

Here is the abbreviated debug output from the build:

[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实例,并且还指定了一个全局快照存储库:

I run a setup that mirrors requests to central to our Nexus instance, and also specifies a global snapshot repository too:

    <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>

存在相关依赖项的发行版和快照版本,并且存储库在所有其他方面均按预期工作.

There exists a release and snapshot version of the dependency in question, and the repository works exactly as expected in all other respects.

推荐答案

您的settings.xml文件应配置为如Nexus书中所述.您的配置无效,因为它只能部分覆盖Maven的超级pom.

Your settings.xml file should be configured as documented in the Nexus book. Your configuration wont work since it only partly overrides the super pom of Maven.

这篇关于Maven版本插件跳过更新检查的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆