解决Failure to transfer org.apache.maven.plugins:maven-surefire-plugin:pom:2.12.4问题

有时候我们的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

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容

  • Spring Cloud为开发人员提供了快速构建分布式系统中一些常见模式的工具(例如配置管理,服务发现,断路器,智...
    卡卡罗2017阅读 134,845评论 18 139
  • 所有项目的构建都是有生命周期的,这个生命周期包括:项目清理、初始化、编译、测试、打包、集成测试、验证、部署、站点生...
    zlcook阅读 2,804评论 0 21
  • 我jdk版本是1.7.0_95,在网上查了一下1.7属于java7maven3.3+版本都支持java7,所以我使...
    liangxifeng833阅读 1,285评论 0 2
  • Maven编译代码的相关命令 第一、main目录下的主代码编写完毕后,使用Maven进行编译,在项目根目录下运行命...
    加油小杜阅读 1,230评论 0 2
  • 肥胖的云朵绵绵地挤抱成团,天幕被压得老低老低。这是连太阳也懒得露脸的一个午后,阿婆早早就收拾了碗筷往檐下的安乐椅上...
    傻哈啦阅读 263评论 0 0