用IDEA创建项目出错
之前的项目是可以正常建立的,但是在验证AreaController的时候报错了,想重新建立一个项目,就报错了
The metadata E:\maven-repo\org\apache\maven\plugins\maven-archetype-plugin\maven-metadata-alimaven.xml is invalid: unexpected markup
D:\JDK8\bin\java.exe -Dmaven.multiModuleProjectDirectory=C:\Users\Administrator\AppData\Local\Temp\archetypetmp -Dmaven.home=D:\apache-maven-3.6.3 -Dclassworlds.conf=D:\apache-maven-3.6.3\bin\m2.conf "-Dmaven.ext.class.path=D:\IDEA\IntelliJ IDEA 2020.3\plugins\maven\lib\maven-event-listener.jar" "-javaagent:D:\IDEA\IntelliJ IDEA 2020.3\lib\idea_rt.jar=51171:D:\IDEA\IntelliJ IDEA 2020.3\bin" -Dfile.encoding=UTF-8 -classpath D:\apache-maven-3.6.3\boot\plexus-classworlds-2.6.0.jar;D:\apache-maven-3.6.3\boot\plexus-classworlds.license org.codehaus.classworlds.Launcher -Didea.version=2020.3 -s D:\apache-maven-3.6.3\conf\settings.xml -DinteractiveMode=false -DgroupId=com.imooc -DartifactId=o2o -Dversion=1.0-SNAPSHOT -DarchetypeGroupId=org.apache.maven.archetypes -DarchetypeArtifactId=maven-archetype-webapp -DarchetypeVersion=RELEASE org.apache.maven.plugins:maven-archetype-plugin:RELEASE:generate
[INFO] Scanning for projects...
[WARNING] The metadata E:\maven-repo\org\apache\maven\plugins\maven-archetype-plugin\maven-metadata-alimaven.xml is invalid: unexpected markup <!d (position: START_DOCUMENT seen \r\n<!d... @2:4)
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.533 s
[INFO] Finished at: 2021-06-09T06:56:13+08:00
[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 (E:\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
Process finished with exit code 1
正在回答 回答被采纳积分+1
同学你好,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文件夹,比如我的位置在这里:
可能因为是网络问题导致jar包下载有问题,同学可以多删除几次再新建试试。
3、在本地仓库配置为阿里云的国内maven仓库的镜像后,在idea中为maven添加参数:-DarchetypeCatalog=local
如上操作后再来试试。
祝学习愉快!
- 参与学习 人
- 提交作业 323 份
- 解答问题 8263 个
本阶段将带你学习主流框架SSM,以及SpringBoot ,打通成为Java工程师的最后一公里!
了解课程
恭喜解决一个难题,获得1积分~
来为老师/同学的回答评分吧
0 星