解决:Could not find metadata org.apache.maven.plugins:maven-archetype-plugin/maven-metadata.xml in loc
我的方法
1.電腦可以Google? ?你要開啟那個小飛機
2.筆記本連接手機熱點
3.重新操作秒下下來? ??
總結:
公司的網太差? , 也有可能做了外網訪問的限制
?
?
?
?
下面是一個大神的方法
https://blog.csdn.net/Ajax_mt/article/details/81870086
?
?
?
解決:Could not find metadata org.apache.maven.plugins:maven-archetype-plugin/maven-metadata.xml in loc
QChess 2018-08-20 14:03:36 ?13453 ?收藏 2
展開
#控制臺輸出
[WARNING] Could not transfer metadata org.apache.maven.plugins:maven-archetype-plugin/maven-metadata.xml from/to central (http://repo.maven.apache.org/maven2): Connection to http://repo.maven.apache.org refused
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 21.776s
[INFO] Finished at: Mon Apr 24 16:50:12 CST 2017
[INFO] Final Memory: 5M/15M
[INFO] ------------------------------------------------------------------------
[ERROR] Plugin org.apache.maven.plugins:maven-archetype-plugin:RELEASE or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-archetype-plugin:jar:RELEASE: Failed to resolve version for org.apache.maven.plugins:maven-archetype-plugin:jar:RELEASE: Could not find metadata org.apache.maven.plugins:maven-archetype-plugin/maven-metadata.xml in local (C:\Users\Administrator\.m2\repository) -> [Help 1]
[ERROR]?
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]?
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginResolutionException
?
#問題產生原因
報錯信息中有這句話: Connection to http://repo.maven.apache.org refused.說明電腦訪問不了maven repository
#解決
maven默認倉庫在國外,下載速度慢,所以需要在setting.xml文件中配置鏡像.這里用的是阿里云鏡像
步驟: 找到maven使用的setting文件 — 找到< mirrors> < /mirrors>選項,在里面添加以下代碼
<mirror>
? <id>alimaven</id>
? <name>aliyun maven</name>
? <url>http://maven.aliyun.com/nexus/content/groups/public/</url>
? <mirrorOf>central</mirrorOf> ? ? ? ?
</mirror>
?
保存后,重新啟動項目就搞定.
?
?
Gogerous:6663月前
哈防御塔:和你的錯誤一樣,用了你的方法之后還是不行,報同樣的錯誤9月前
查看回復(3)
農夫程序員:我天 我就是用了這個鏡像報錯了 什么解決1年前
查看回復(3)
木痕:大神6662年前
————————————————
版權聲明:本文為CSDN博主「QChess」的原創文章,遵循CC 4.0 BY-SA版權協議,轉載請附上原文出處鏈接及本聲明。
原文鏈接:https://blog.csdn.net/Ajax_mt/article/details/81870086
總結
以上是生活随笔為你收集整理的解决:Could not find metadata org.apache.maven.plugins:maven-archetype-plugin/maven-metadata.xml in loc的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 电脑Windows磁盘修复工具如何使用电
- 下一篇: 女生还不会装电脑不会电脑的女生可以做什么