美文网首页
Eclipse导入项目,pom.xml第一行报红叉的解决方法

Eclipse导入项目,pom.xml第一行报红叉的解决方法

作者: 冰人颜如玉 | 来源:发表于2019-08-29 11:35 被阅读0次

错误提示:

Failure to transfer org.apache.maven.plugins:maven-surefire-plugin:jar:2.12.4 from https://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.apache.maven.plugins:maven-surefire-plugin:jar:2.12.4 from/to central (https://repo.maven.apache.org/maven2): connect timed out。

原因:这是由于缺少maven-surefire-plugin-2.12.4 .jar文件。

解决办法:

步骤1:maven-surefire-plugin-2.12.4 .jar文件是在C:\Users\XX\.m2\repository\org\apache\maven\plugins\maven-surefire-plugin\下。

步骤2:找到该路径,把在2.12.4文件中的文件全部删除(也可以把同一层的文件全部删除,别怕,下面会教你全部下载回来,如果怕可以拷贝一份出来),

步骤3:返回项目,右键-->maven(也可能是Maven4MyEclipse)-->update Project,这样你的包就会下载回来了,错误自然消失。

相关文章

网友评论

      本文标题:Eclipse导入项目,pom.xml第一行报红叉的解决方法

      本文链接:https://www.haomeiwen.com/subject/qzzbectx.html