IDEA [ERROR] Maven execution terminated abnormally (exit code 1)报错

D:\Java\bin\java -Dmaven.home=D:\apache-maven-3.0.5 -Dclassworlds.conf=D:\apache-maven-3.0.5\bin\m2.conf -Dfile.encoding=UTF-8 -classpath D:\apache-maven-3.0.5\boot\plexus-classworlds-2.4.jar org.codehaus.classworlds.Launcher -Didea.version=15.0.6 -DinteractiveMode=false -DgroupId=com -DartifactId=mmall -Dversion=1.0-SNAPSHOT -DarchetypeGroupId=org.apache.maven.archetypes -DarchetypeArtifactId=maven-archetype-webapp -DarchetypeVersion=RELEASE org.apache.maven.plugins:maven-archetype-plugin:RELEASE:generate
[ERROR] Error executing Maven.
[ERROR] 1 problem was encountered while building the effective settings
[FATAL] Non-parseable settings C:\Users\Leon\.m2\settings.xml: in comment after two dashes (--) next character must be > not (position: START_TAG seen ...</mirror>\n </mirrors>\n\n <!-- ... @161:8) @ C:\Users\Leon\.m2\settings.xml, line 161, column 8

[ERROR] Maven execution terminated abnormally (exit code 1)

 

 

 

 

以上报错的原因是:.m2文件夹(Maven的配置文件)下的settings.xml配置错误,显示在161行的位置

 

解决方法:重新配置settings.xml

 

1.找到.m2文件夹(在C:\Users\你的用户名下\),删除包括setting.xml的所有.m2文件夹下面的文件。

 

2.找到Maven的安装位置,找到(D:\apache-maven-3.0.5\conf)下的settings.xml拷贝到.m2文件夹下,重新创建IDEA项目即可。

posted @ 2018-03-01 15:41  番茄和沙司  阅读(2212)  评论(0编辑  收藏  举报