具体错误:
ArtifactTransferException: Failure to transfer org.apache.maven.plugins:maven-resources-plugin:pom:3.1.0 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-resources-plugin:pom:3.1.0 from/to central (https://repo.maven.apache.org/maven2): The operation was cancelled.
java.lang.reflect.InvocationTargetException
出现原因
1.创建项目时在创建maven-resources-plugin出现网路不稳定或在未完成创建的时候关闭STS
解决方法
删除maven 本地仓库maven-resources-plugin目录
路径:你的 本地maven仓库l下的/repository\org\apache\maven\plugins
在plugins下找到maven-resources-plugin删除(如果提示正在使用,关闭STS即可)
如果上面的操作不行的话删除repository相关目录
maven在本地默认地址:c:/用户/{本机用户名}/.m2/repository,