创建工程之后报错了

创建工程之后报错了

[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 (f:\maven-repo) -> [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

正在回答

登陆购买课程后可参与讨论,去登陆

3回答

同学你好。

1、有用的报错信息是:

Could not find metadata org.apache.maven.plugins:maven-archetype-plugin/maven-metadata.xml in local

显示同学的plugins中,有一个文件找不到,可能是同学下载的时候没有下载好。

2、同学可以打开本地maven仓库,删除/org/apache/maven/plugins/下的maven-archetype-plugin文件夹,比如我的位置在这里:

http://img1.sycdn.imooc.com//climg/5d5caac40001dfa605490332.jpg

然后重新再试一下~

祝学习愉快~

  • 我的曲奇饼呢 提问者 #1
    删了重新创建还是这个报错..
    2019-08-21 11:18:56
芝芝兰兰 2019-08-21 14:46:41

同学你好。这个还是网络原因导致的,因为是外网,同学可以多删除几次再新建试试。

如果同学想要快一些,也可以尝试如下方式:

找到idea中配置的那个本地maven(一定是和配置一致的哦),找到conf文件夹中的settings.xml

5d5bb1a1000113d005000205.jpg

改变mirror:为本地仓库配置为阿里云的国内maven仓库的镜像

<mirror>
    <id>alimaven</id>
    <name>aliyun maven</name>
    <url>http://maven.aliyun.com/nexus/content/groups/public/</url>
    <mirrorOf>central</mirrorOf>       
</mirror>

然后在idea中为maven添加参数:-DarchetypeCatalog=local

5d5bb2cb0001c8d305000264.jpg

祝学习愉快~


  • 提问者 我的曲奇饼呢 #1
    好的,已经解决了,谢谢老师
    2019-08-22 12:16:07
提问者 我的曲奇饼呢 2019-08-21 01:02:26

http://img1.sycdn.imooc.com//climg/5d5c277e0001f9af12390209.jpg环境配置的也是自己创建的mevan文件夹

问题已解决,确定采纳
还有疑问,暂不采纳

恭喜解决一个难题,获得1积分~

来为老师/同学的回答评分吧

0 星
请稍等 ...
微信客服

购课补贴
联系客服咨询优惠详情

帮助反馈 APP下载

慕课网APP
您的移动学习伙伴

公众号

扫描二维码
关注慕课网微信公众号

在线咨询

领取优惠

免费试听

领取大纲

扫描二维码,添加
你的专属老师