问题发生原因:java maven项目导入eclipse报错
问题描述如下
Description Resource Path Location Type
Failure to transfer org.apache.maven.plugins:maven-surefire-plugin:pom: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:pom:2.12.4 from/to central (https://repo.maven.apache.org/maven2):
The operation was cancelled. pom.xml /data.core line 1 Maven Configuration Problem
大概意思是:从maven中心仓库拉 maven-surefire-plugin:pom:2.12.4 这个jar包到本地仓库时失败,不会重新下载jar包,除非maven更改索引或强制更新
解决办法:
1.找到本地的maven仓库(具体位置看自己放到哪里,例如:E:\repo)对应报错的目录,例如我的这个报错位置在:
E:\repo\org\apache\maven\plugins\maven-surefire-plugin\2.12.4 删除此目录
2.点击项目右键–>maven–>Update Project
3.更新完后,报错消失