码迷,mamicode.com
首页 > 其他好文 > 详细

pom.xml文件错误

时间:2017-05-11 10:16:00      阅读:223      评论:0      收藏:0      [点我收藏+]

标签:schema   下载   could not   att   target   http   repo   nsf   文件   

刚创建的maven项目,马上pom.xml的第一行就报错
这是第一行:<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
错误信息:
Failure to transfer org.apache.maven.plugins:maven-surefire-plugin:pom:2.10 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.10 from/to central (http://repo.maven.apache.org/maven2): null to http://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-surefire-plugin/2.10/maven-surefire-plugin-2.10.pom 
pom.xml /sypro line 1 
Maven Configuration Problem

 

报错错误信息大概意思是说maven想要尝试去下载maven-surefire-plugin,但是又无法下载。

解决方法:

 

  • 首先确定你的电脑是否可以连接网络。

  • 如果可以连接网络,在maven的本地库的路径下执行以下命令:

  • for /r %i in (*.lastUpdated) do del %i
  • 最后,尝试刷新maven工程,看是否可以成功。

pom.xml文件错误

标签:schema   下载   could not   att   target   http   repo   nsf   文件   

原文地址:http://www.cnblogs.com/shizhijie/p/6839277.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!