解决: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

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值