Eclipse 中的 Maven pom.xml 错误
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/22154022/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-10 22:01:59 来源:igfitidea点击:
Maven pom.xml error in eclipse
提问by Deepesh Uniyal
I am getting below error in the first line of my pom.xml
我在 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
回答by Gobinath
- Goto the directory
{Home}/.m2/repository/org/apache
. - Delete the
maven
folder. - Right click on your Maven project in Eclipse and select Maven -> Update Project...
- In the appeared dialog, select the
Force Update of Snapshots/Releases
and click OK
- 转到目录
{Home}/.m2/repository/org/apache
。 - 删除
maven
文件夹。 - 在 Eclipse 中右键单击您的 Maven 项目并选择 Maven -> 更新项目...
- 在出现的对话框中,选择
Force Update of Snapshots/Releases
并单击确定
Make sure that, you do not have any proxy related problems when updating the project again.
确保在再次更新项目时没有任何与代理相关的问题。