maven提示 Could not read settings.xml

Eclipse中配置maven时,提示错误:Could not read settings.xml
在这里插入图片描述
出错原因:mavensettings.xml文件内有不合法字符,将其删除修改正确即可

例如如下情况
在这里插入图片描述
只有一个 <!--,就会报错,将其补全,即可
在这里插入图片描述
在这里插入图片描述

C:\Users\z84405515\.jdks\ms-17.0.15\bin\java.exe -Dmaven.multiModuleProjectDirectory=C:\Users\z84405515\AppData\Local\Temp\archetype1tmp "-Dmaven.home=C:\Program Files\Maven" "-Dclassworlds.conf=C:\Program Files\Maven\bin\m2.conf" "-Dmaven.ext.class.path=C:\Program Files\JetBrains\IntelliJ IDEA 2024.3.2.2\plugins\maven\lib\maven-event-listener.jar" "-javaagent:C:\Program Files\JetBrains\IntelliJ IDEA 2024.3.2.2\lib\idea_rt.jar=63111:C:\Program Files\JetBrains\IntelliJ IDEA 2024.3.2.2\bin" -Dfile.encoding=UTF-8 -classpath "C:\Program Files\Maven\boot\plexus-classworlds-2.5.2.jar" org.codehaus.classworlds.Launcher -Didea.version=2024.3.2.2 -s "C:\Program Files\Maven\conf\settings.xml" -Dmaven.repo.local=C:\04_DevTools\maven_repo2 -DinteractiveMode=false -DgroupId=com.example -DartifactId=SpringBoot2 -Dversion=1.0-SNAPSHOT -DarchetypeGroupId=org.apache.maven.archetypes -DarchetypeArtifactId=maven-archetype-quickstart -DarchetypeVersion=1.1 org.apache.maven.plugins:maven-archetype-plugin:RELEASE:generate [INFO] Scanning for projects... Downloading: https://cmc.centralrepo.rnd.huawei.com/maven/org/apache/maven/plugins/maven-archetype-plugin/maven-metadata.xml Downloading: https://dgg.maven.repo.cmc.tools.huawei.com/artifactory/BPIT-public-maven/org/apache/maven/plugins/maven-archetype-plugin/maven-metadata.xml [WARNING] Could not transfer metadata org.apache.maven.plugins:maven-archetype-plugin/maven-metadata.xml from/to artifact-plugins (https://dgg.maven.repo.cmc.tools.huawei.com/artifactory/BPIT-public-maven/): PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target [WARNING] Could not transfer metadata org.apache.maven.plugins:maven-archetype-plugin/maven-metadata.xml from/to dg-artifact (https://cmc.centralrepo.rnd.huawei.com/maven/): PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 0.377 s [INFO] Finished at: 2025-06-10T20:52:53+08:00 [INFO] Final Memory: 9M/48M [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 (C:\04_DevTools\maven_repo2) -> [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
最新发布
06-11
评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

悟世君子

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值