侧边栏壁纸
  • 累计撰写 1,975 篇文章
  • 累计创建 73 个标签
  • 累计收到 20 条评论

目 录CONTENT

文章目录

使用本地仓库和配置文件创建Maven Web项目初始化失败报错:Non-parseable settings

猿哥
2021-10-23 / 0 评论 / 0 点赞 / 1,009 阅读 / 0 字
使用本地仓库创建maven web项目初始化报错,没有生成相应的文件夹,但是使用IDEA自带的maven配置可以正常创建web项目

"C:\Program Files\Java\jdk-11.0.12\bin\java.exe" -Dmaven.multiModuleProjectDirectory=C:\Users\Administrator\AppData\Local\Temp\archetype1tmp -Dmaven.home=D:\Devtools\Maven-3.8.3 -Dclassworlds.conf=D:\Devtools\Maven-3.8.3\bin\m2.conf "-Dmaven.ext.class.path=C:\Program Files\JetBrains\IntelliJ IDEA 2020.3.3\plugins\maven\lib\maven-event-listener.jar" "-javaagent:C:\Program Files\JetBrains\IntelliJ IDEA 2020.3.3\lib\idea_rt.jar=59667:C:\Program Files\JetBrains\IntelliJ IDEA 2020.3.3\bin" -Dfile.encoding=UTF-8 -classpath D:\Devtools\Maven-3.8.3\boot\plexus-classworlds-2.6.0.jar;D:\Devtools\Maven-3.8.3\boot\plexus-classworlds.license org.codehaus.classworlds.Launcher -Didea.version=2020.3.3 -s D:\Devtools\Maven-3.8.3\conf\settings.xml -Dmaven.repo.local=D:\Devtools\Maven-3.8.3\repository -DinteractiveMode=false -DgroupId=org.example -DartifactId=web003 -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] 2 problems were encountered while building the effective settings
[FATAL] Non-parseable settings D:\Devtools\Maven-3.8.3\conf\settings.xml: in comment after two dashes (--) next character must be > not   (position: START_TAG seen ...ore artifacts.\r\n   |\r\n   | Default: ${user.home}/.m2/repository-- ... @52:45)  @ D:\Devtools\Maven-3.8.3\conf\settings.xml, line 52, column 45
[FATAL] Non-parseable settings D:\Devtools\Maven-3.8.3\conf\settings.xml: in comment after two dashes (--) next character must be > not   (position: START_TAG seen ...ore artifacts.\r\n   |\r\n   | Default: ${user.home}/.m2/repository-- ... @52:45)  @ D:\Devtools\Maven-3.8.3\conf\settings.xml, line 52, column 45

解决:
可以看到是配置文件的问题,已经提示很清楚了,52行的注释有问题,这句话的大概意思是在两个-后面必须不是>而不是-


修改配置文件
修改为:


点击运行重启
或者重新新建项目


0
博主关闭了所有页面的评论