在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 TypeArtifactDescriptorException: 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版本的问题是什么。任何帮助都会有所帮助。谢谢!
1 回答
Cats萌萌
TA贡献1805条经验 获得超9个赞
听起来像是较早的下载尝试失败。如消息所述,resolution will not be reattempted until the update interval of central has elapsed or updates are forced
-通常更新间隔为24小时。
如果尚未尝试过,建议使用强制更新选项- mvn -U
。(如果是在Eclipse中,则根据列标题判断,请Force Update
在Maven
/Update project
对话框中查找)。
仅供参考,可以从此处下载相同的工件版本。
添加回答
举报
0/150
提交
取消