-->

故障转移的依赖,在本地仓库被缓存(Failure to transfer dependency, w

2019-06-24 15:09发布

我工作的一个Maven 2项目在Eclipse中,和我有M2E插件,和我收到以下错误在Eclipse:

Failure to transfer com.thoughtworks.xstream:xstream:pom:1.3.1 from http://repo1.maven.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 com.thoughtworks.xstream:xstream:pom:1.3.1 from/to central (http://
 repo1.maven.org/maven2): Failed to create a selector. to http://repo1.maven.org/maven2/com/thoughtworks/xstream/
 xstream/1.3.1/xstream-1.3.1.pom

我通过删除.lastUpdated文件,那么干净,建设有没有运气,仍然得到同样的错误,请指教随后对类似的问题的答案。

Answer 1:

删除.lastUpdated文件和依赖然后再下载后问题解决。



Answer 2:

您可以使用-U参数来强制更新的版本和快照远程仓库进行检查,并解决此问题。

其实你可以发现通过使用该解决方案mvn -h显示Maven的帮助。



Answer 3:

如果您使用的是Eclipse:

  • Window->Preferences->Maven
    检查下载神器源代码,神器的javadoc,在启动时更新Maven项目。

  • 在包含pom.xml中文件夹,运行:
    mvn clean install -U

它为我工作:)。



Answer 4:

发生错误的Maven工具的旧的缓存怎么一回事,因为出现在目录中。 所以,你必须删除它。 转到C \用户\“用户名” \ m2的然后将其删除。



文章来源: Failure to transfer dependency, was cached in the local repository