Failure to transfer org.apache.maven.plugins:maven-surefire-plugin:pom:2.22.2 from https://repo.maven.apache.org/maven2 was cached in the local repository

报以上的错误,一般是下载中断导致(网络忙),文件依赖等不全,那么又下载了jar,所以没再去下载。

解决:

前往文件夹:

/Users/xxx(您的用户名)/.m2/repository

找到/Users/xxx(您的用户名)/.m2/repository/org/apache/maven/plugins/maven-surefire-plugin/2.22.2(这个就是报错的版本,将其删除)

然后进入eclipse:

让eclipse重新去下载就可以了。

原文地址:https://www.cnblogs.com/jiduoduo/p/14098486.html