环境: 电脑型号:ThinkPad R480 16G+500G Windows10系统
IDE工具:IntelliJ IDEA 2018.1.5
Java版本:jdk1.8.0_171
Maven版本:apache-maven-3.6.2
问题描述: 设置好Java和Maven环境后,使用idea中的spring initializr构建一个只包含web的demo,下载依赖时出现以下错误:
D:\Java\jdk1.8.0_171\bin\java.exe -Dmaven.multiModuleProjectDirectory=D:\IdeaProjects\demo -Dmaven.home=D:\apache-maven-3.6.2 -Dclassworlds.conf=D:\apache-maven-3.6.2\bin\m2.conf "-javaagent:D:\IntelliJ IDEA 2018.1.5\lib\idea_rt.jar=60044:D:\IntelliJ IDEA 2018.1.5\bin" -Dfile.encoding=UTF-8 -classpath D:\apache-maven-3.6.2\boot\plexus-classworlds-2.6.0.jar org.codehaus.classworlds.Launcher -Didea.version=2018.1.5 clean -f pom.xml
[INFO] Scanning for projects...
Downloading from nexus-aliyun: https://maven.aliyun.com/repository/public/org/springframework/boot/spring-boot-starter-parent/2.2.2.RELEASE/spring-boot-starter-parent-2.2.2.RELEASE.pom
[ERROR] [ERROR] Some problems were encountered while processing the POMs:
[FATAL] Non-resolvable parent POM for com.example:demo:0.0.1-SNAPSHOT: Could not transfer artifact org.springframework.boot:spring-boot-starter-parent:pom:2.2.2.RELEASE from/to nexus-aliyun (https://maven.aliyun.com/repository/public): sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target and 'parent.relativePath' points at no local POM @ line 5, column 13
@
[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]
[ERROR] The project com.example:demo:0.0.1-SNAPSHOT (D:\IdeaProjects\demo\pom.xml) has 1 error
[ERROR] Non-resolvable parent POM for com.example:demo:0.0.1-SNAPSHOT: Could not transfer artifact org.springframework.boot:spring-boot-starter-parent:pom:2.2.2.RELEASE from/to nexus-aliyun (https://maven.aliyun.com/repository/public): sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target and 'parent.relativePath' points at no local POM @ line 5, column 13 -> [Help 2]
[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/ProjectBuildingException
[ERROR] [Help 2] http://cwiki.apache.org/confluence/display/MAVEN/UnresolvableModelException
Process finished with exit code 1
settings文件配置如下:
<?xml version="1.0" encoding="UTF-8" ?>
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">
<localRepository>D:\repository</localRepository>
<pluginGroups>
</pluginGroups>
<proxies>
</proxies>
<servers>
</servers>
<mirrors>
<mirror>
<id>nexus-aliyun</id>
<mirrorOf>*</mirrorOf>
<name>Nexus aliyun</name>
<url>https://maven.aliyun.com/repository/public</url>
</mirror>
<mirror>
<id>central</id>
<mirrorOf>*</mirrorOf>
<name>Maven Repository Switchboard</name>
<url>https://repo1.maven.org/maven2/</url>
</mirror>
</mirrors>
<profiles>
</profiles>
</settings>
百度出的结果是需要信任阿里证书,已添加信任
甚至生成了jssecacerts
文件,修改过maven版本,都没有作用,求大神指教!
版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。