解决Maven Configuration Problem问题

导入老是报错—看了个博客,特此记录一下

Description Resource
Path Location
Type
Failure to transfer org.apache:apache:pom:8 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 org.apache:apache:pom:8 from/to central (http://repo1.maven.org/maven2): No response received after 60000
pom.xml /sshe
line 1 Maven Configuration Problem

仔细查看pom.xml文件也没找到什么问题,郁闷了一下午,找了很多资料都没有解决,最后在stack overflaw上找到了解决问题的答案,在此做一个记录
删除所有下载失败的文件:

linux下
~/.m2 -name “*.lastUpdated” -exec grep -q “Could not transfer” {} \; -print -exec rm {} \;

window下

cd %userprofile%.m2\repository
for /r %i in (*.lastUpdated) do del %i

然后右击你的工程,Maven->”Update Project …”,即可解决。

你可能感兴趣的:(java)