idea中maven項目plugins出現紅線錯誤的解決辦法


轉載來源:http://blog.sina.com.cn/s/blog_90aad2c90101lce4.html

maven的pom報plugins錯誤的解決方法.
引用
Failure to transfer org.apache.maven.plugins:maven-surefire-plugin:pom:2.7.1 from http://repo1.maven.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

 


碰到一個類似以上的錯誤.以maven-surefire-plugin-2.7.1.jar報紅為例子


原因是maven的plugin並未正在下載到本地.

 


首先查看maven倉庫位置

 

進入
~\.m2\repository\org\apache\maven\plugins\maven-surefire-plugin\2.7.1

 


的話,會發現里面只有一個

maven-surefire-plugin-2.7.1.pom.lastUpdated

的文件.


而並沒有maven-surefire-plugin-2.7.1.jar

 


解決辦法:


1.刪除所有以lastUpdated結尾的文件


2.重新點擊reimport即可

 

 


如果點擊更新后發現

~\.m2\repository\org\apache\maven\plugins\maven-surefire-plugin\2.7.1

下還是沒有maven-surefire-plugin-2.7.1.jar


http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-surefire-plugin/2.7.1/


下載

 

maven-surefire-plugin-2.7.1.jar
maven-surefire-plugin-2.7.1.jar.sha1
maven-surefire-plugin-2.7.1.pom
maven-surefire-plugin-2.7.1.pom.sha1

 

 


包再重復步驟2. 

轉載來源:http://blog.sina.com.cn/s/blog_90aad2c90101lce4.html 
作者:多情栗子 (本人小修改23333)


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM