【问题标题】:Failed to collect dependencies at未能收集依赖项
【发布时间】:2015-10-19 16:49:27
【问题描述】:

我只是想理解一些事情。假设我正在尝试引入这个依赖项

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.thirdwatch</groupId>
<artifactId>mvn-to-cpe</artifactId>
<version>1.0</version>
<dependencies>
    <dependency>
        <groupId>ch.racic.testing</groupId>
        <artifactId>test-configuration-manager</artifactId>
        <version>0.9.5</version>
        <exclusions>
            <exclusion>
                <groupId>*</groupId>
                <artifactId>*</artifactId>
            </exclusion>
        </exclusions>
    </dependency>
</dependencies>
</project>

我收到以下错误

[ERROR] Failed to execute goal on project mvn-to-cpe: Could not resolve dependencies for project com.thirdwatch:mvn-to-cpe:jar:1.0: Failed to collect dependencies at ch.racic.testing:test-configuration-manager:jar:0.9.5: Failed to read artifact descriptor for ch.racic.testing:test-configuration-manager:jar:0.9.5: Failure to find ch.racic.testing:test-configuration-manager-parent:pom:0.9.5 in http://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced -> [Help 1]

.jar 似乎丢失了。我们正在使用 Nexus 服务器,这就是它所显示的内容

我相信 Nexus 反映了 Central Maven Repo,并且 Central maven 似乎拥有它。

https://repo1.maven.org/maven2/ch/racic/testing/test-configuration-manager/0.9.5/

http://search.maven.org/#artifactdetails%7Cch.racic.testing%7Ctest-configuration-manager%7C0.9.5%7Cjar

造成这种差异的原因是什么? 我们是否镜像了错误的 Maven 存储库?

【问题讨论】:

  • @EGHM 指出版本 0.9.4 有一个 jar,而版本 0.9.5 使用父 pom。我不知道父 pom 是否与它有关,但我们怀疑它可能...
  • 很抱歉现在才看到这个,是的,我的部署方式似乎有问题...我试图找出原因,因为部署日志告诉我它已上传到 maven Central (父 pom 工件)但不确定为什么它最终不存在。似乎有 0.9.5-SNAPSHOT 但发布版本上没有
  • 好吧,似乎它以某种方式卡在了暂存中,它们被上传但如果不是快照则永远不会被提升

标签: maven nexus


【解决方案1】:

切换到多模块项目时,pom 文件中存在问题,它确实暂存了所有内容,但仅自动释放了核心工件...

现在已修复,0.13.2 包含所有工件,很抱歉给您带来不便,但单元测试没有涵盖那个,我注意到它安装运行良好,所以我可以在我的机器上使用它:- /

【讨论】:

  • 顺便说一句。我还没有添加任何文档,所以单元测试是文档,但如果需要,我可以在有时间的时候记录它?
  • 顺便说一句。问题是其他工件缺少 gpg 插件来创建签名,并且在从 staging 升级到 prod 期间被拒绝,现在将该插件配置移动到父级,因为它被所有子模块继承
猜你喜欢
  • 2020-08-09
  • 2011-11-27
  • 2016-02-05
  • 1970-01-01
  • 2013-01-14
  • 1970-01-01
  • 1970-01-01
  • 2022-06-19
  • 2021-01-04
相关资源
最近更新 更多