开发者社区> 问答> 正文

idea使用maven构建服务,报PKIX path building failed错误

环境:     电脑型号: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>
 

百度出的结果是需要信任阿里证书,已添加信任

图片.png

甚至生成了jssecacerts文件,修改过maven版本,都没有作用,求大神指教!

展开
收起
游客w7odq4xhefpvk 2019-12-16 17:31:26 3005 0
0 条回答
写回答
取消 提交回答
问答排行榜
最热
最新

相关电子书

更多
蚂蚁金服高级开发工程师萧恺:IDEA 插件开发入门教程 立即下载
Behavior Driven Development (BDD) Testing with Apache Spark 立即下载
Sparklint a Tool for Identifyi 立即下载

相关镜像