url:https://www.pianshen.com/article/8003307916/
Description Resource Path Location Type Failure to transfer org.apache.maven.plugins:maven-surefire-
maven項目更新老是報錯 Description Resource Path Location Type 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 interva
都把.m2下的倉庫清理了n遍,還是不管用,還是佩服老外解決辦法:
linux下在終端命令行直接輸入
find ~/.m2 -name "*.lastUpdated" -exec grep -q "Could not transfer" {} \; -print -exec rm {} \;
再此更新項目即可
win下輸入:
cd %userprofile%\.m2\repository
for /r %i in (*.lastUpdated) do del %i
更新項目即可
我是在linux下,親試有效。
如果還是報錯:則試試以下方法:
解決辦法:
右鍵工程,選擇maven->update project,勾選force update ……
