刚创建的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工程,看是否可以成功。

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-01-18
  • 2022-12-23
  • 2021-10-04
  • 2021-08-04
  • 2021-05-28
  • 2022-01-04
猜你喜欢
  • 2021-10-29
  • 2022-12-23
  • 2021-08-27
  • 2021-10-30
  • 2021-12-24
  • 2021-06-01
  • 2022-12-23
相关资源
相似解决方案