在使用Maven時出現以下錯誤:
Failure to transfer org.apache.maven.plugins:maven-jar-plugin:pom:2.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.
分析問題:查閱資料后推測是包的問題。
1、找到maven的包的位置:window->preferences->Maven->User Settings找到。
一般是在:{user.home}.m2\repository
2、查看是哪個包的問題,例如:我的問題是org.apache.maven.plugins:maven-jar-plugin包下的2.4出了問題。
則找到:C:\Users\Admin.m2\repository\org\apache\maven\plugins\maven-jar-plugin\2.4 刪除這個包。
3、回到Eclipse右鍵項目選擇Maven->Update Project…
一次不行則多來幾次
原理:Maven包出錯,刪了就好…