Idea下Maven开发webapp时候,出现无法解析Maven-archetype-plugin情况

在Centos7上使用Idea和Maven开发webapp时遇到Maven-archetype-plugin解析失败的问题。错误原因是settings.xml中的代理设置IP和端口不再有效。解决方案是更新settings.xml文件,添加或更新代理配置,确保使用能够访问外网的代理服务器。
摘要由CSDN通过智能技术生成

1.Centos7开发环境下,使用Idea下Maven开发webapp时候,出现无法解析Maven-archetype-plugin情况,控制台出现如下代码。

[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.030 s
[INFO] Finished at: 2017-07-07T08:53:53+08:00
[INFO] Final Memory: 7M/106M
[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
(/home/cloud/.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
[ERROR] Maven execution terminated abnormally (exit code 1)

这个问题浪费了我很长时间,一开始以为是无法加载Maven-archetype-plugin这个插件所导致的,百度谷歌了很多方法,问题依然没有解决(网上解决这个问题的方法主要有两种,一种是修改settings.xml里面的镜像,另一种下载jar包进行替换,参考网址https://www.bbsmax.com/A/pRdBjPnndn/

当我熟手无措的时候,查看控制台错误提示发现,如下代码

评论 4
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值