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/)
当我熟手无措的时候,查看控制台错误提示发现,如下代码