gpt4 book ai didi

java - 添加依赖项mockito 1.10.19版本时出现ArtifactDescriptorException

转载 作者:行者123 更新时间:2023-12-02 02:04:34 27 4
gpt4 key购买 nike

在 pom.xml 文件中添加以下依赖项时,出现 ArtifactDescriptorException

<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-all</artifactId>
<version>1.10.19</version>
<scope>test</scope>
</dependency>

问题:

Description Resource    Path    Location    Type
ArtifactDescriptorException: Failed to read artifact descriptor for org.mockito:mockito-all:jar:1.10.19: ArtifactResolutionException: Failure to transfer org.mockito:mockito-all:pom:1.10.19 from 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. Original error: Could not transfer artifact org.mockito:mockito-all:pom:1.10.19 from/to central (http://repo.maven.apache.org/maven2): repo.maven.apache.org pom.xml /mockito-example line 1 Maven Dependency Problem

但是,它在 1.10.18 或 1.10.17 上运行良好

 <dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-all</artifactId>
<version>1.10.18</version>
<scope>test</scope>
</dependency>

我不明白 1.10.19 版本有什么问题。任何帮助都会有所帮助。谢谢!

最佳答案

听起来之前的下载尝试失败了。正如消息所述,在中央更新间隔已过或强制更新之前,不会重新尝试解析 - 通常更新间隔为 24 小时。

如果您还没有尝试过,建议使用强制更新选项 - mvn -U。 (如果这是在 Eclipse 中,根据列标题判断,请在 Maven/Update project 对话框中查找 Force Update)。

仅供引用,相同的 Artifact 版本可以从这里下载良好。

关于java - 添加依赖项mockito 1.10.19版本时出现ArtifactDescriptorException,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51002827/

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