本文介绍了Eclipse中的Maven pom.xml错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在pom.xml的第一行中遇到错误

I am getting below error in the first line of my pom.xml

Failure to transfer org.apache.maven.plugins:maven-surefire-plugin:pom:2.12.4 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.plugins:maven-surefire-plugin:pom:2.12.4 from/to central (http://repo.maven.apache.org/maven2): repo.maven.apache.org

推荐答案

  1. 转到目录{Home}/.m2/repository/org/apache.
  2. 删除maven文件夹.
  3. 在Eclipse中右键单击您的Maven项目,然后选择Maven->更新项目...
  4. 在出现的对话框中,选择Force Update of Snapshots/Releases并单击确定"
  1. Goto the directory {Home}/.m2/repository/org/apache.
  2. Delete the maven folder.
  3. Right click on your Maven project in Eclipse and select Maven -> Update Project...
  4. In the appeared dialog, select the Force Update of Snapshots/Releases and click OK

请确保在再次更新项目时没有任何与代理相关的问题.

Make sure that, you do not have any proxy related problems when updating the project again.

这篇关于Eclipse中的Maven pom.xml错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-22 07:04