gpt4 book ai didi

Maven 版本插件跳过更新检查

转载 作者:行者123 更新时间:2023-12-04 15:25:20 25 4
gpt4 key购买 nike

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

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

最佳答案

您的 settings.xml 文件应该被配置 as documented in the Nexus book .您的配置将不起作用,因为它只是部分覆盖了 Maven 的 super pom。

关于Maven 版本插件跳过更新检查,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11193070/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com