zbb20180710 maven Failed to read artifact descriptor--maven
生活随笔
收集整理的這篇文章主要介紹了
zbb20180710 maven Failed to read artifact descriptor--maven
小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.
Failed to read artifact descriptor--maven 2016年09月10日 13:30:46 閱讀數(shù):13036 在開發(fā)的過程中,作為新手,經(jīng)常遇到Maven下載依賴的時候,"Failed to read artifact descriptor for xxx:jar"的錯誤 對于這種非業(yè)務(wù)相關(guān)的問題,耽誤時間非常不效率,看到網(wǎng)站很多博文,思路大概是這樣的 思路1:?刪除倉庫內(nèi)對應(yīng)依賴的文件夾,右單擊項目,Maven4MyEclipse->Update Project,在彈出的對話框中選擇“Force Update Of Snapshots/Releases",然后點擊“OK”。這樣就會重新下載這個jar包。 思路2:?將依賴下載至本地,執(zhí)行mvn install命令 如果在沒有搞清楚問題的時候就魯莽的進行上面的操作,可能不一定能很及時的解決問題. 首先我們要搞清楚"Failed to read artifact descriptor for xxx:jar"的錯誤的根源. 我在倉庫對應(yīng)依賴的文件夾下檢查lastupdate文件的時候,發(fā)現(xiàn)最后一行是connect timed out(連接超時) 網(wǎng)絡(luò)問題導(dǎo)致的下載失敗,無論我們?nèi)绾稳グ凑丈厦娴膬蓚€思路去處理,都很難解決 檢查我的setting.xml,我的鏡像用的是大家比較推薦的兩個: <mirror> <id>CN</id> <name>OSChina Central</name> <url>http://maven.oschina.net/content/groups/public/</url> <mirrorOf>central</mirrorOf> </mirror> <mirror> <id>nexus-osc-thirdparty</id> <mirrorOf>thirdparty</mirrorOf> <name>Nexus osc thirdparty</name> <url>http://maven.oschina.net/content/repositories/thirdparty/</url> </mirror> 但是,有時候,網(wǎng)絡(luò)環(huán)境這東西你懂的,換個其他的鏡像多試驗一下,順利解決 <mirror> <id>repo2</id> <mirrorOf>central</mirrorOf> <name>Human Readable Name for this Mirror.</name> <url>http://repo2.maven.org/maven2/</url> </mirror> 將鏡像放到其他鏡像的前面! 按照我的使用經(jīng)驗,次序靠前的鏡像會被使用,你放的再多,maven也不會按照次序依次選擇的 新手經(jīng)驗,不恰當?shù)亩喽嘟涣?/span>
轉(zhuǎn)載于:https://www.cnblogs.com/super-admin/p/9287794.html
總結(jié)
以上是生活随笔為你收集整理的zbb20180710 maven Failed to read artifact descriptor--maven的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: JAVA之stream汪文君_Java8
- 下一篇: WCF Basic(1)-操作重载