玖叶教程网

前端编程开发入门

Java开发日常问题一(java开发题目)

有时候我们的maven工程的pom.xml文件第一行会报如下错误:

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

The operation was cancelled.

可以尝试以下方法解决:

1.找到maven库目录,进入:\org\apache\maven\plugins\maven-surefire-plugin\2.12.4

2.若2.12.4目录下有maven-surefire-plugin-2.12.4.pom.lastUpdated文件,将其删除

3.项目右键-->maven-->Update Dependencies

编程

发表评论:

控制面板
您好,欢迎到访网站!
  查看权限
网站分类
最新留言