您的位置:首页 > Web前端

2016.6.21 maven:Failure to transfer ... from ....

2016-07-08 17:27 357 查看
问题描述:

才刚新建的工程,什么都没做,就显示pom.xml有问题,在第一行的标签上 有如下错误:



点击详情:

Failure to transfer org.apache.maven:maven-parent:pom:20 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.apache.maven:maven-parent:pom: 20 from/to central (http://repo.maven.apache.org/maven2): null to http://repo.maven.apache.org/maven2/org/apache/maven/maven-parent/20/maven-parent-20.pom

百度了之后知道这个是更新问题(之前忘了设置maven在eclipse的配置,后来设置完了之后还是有错误):

三步:

(1)右键点击该project,选择 run as-》maven clean

(2)右键点击该project,选择 run as-》maven install

(3)右键点击该project,选择 maven-》update project

然后就可以看到错误消失了,如果没有消失,点击restart eclispe即可。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: