求助帖:请求Maven仓库下载依赖包时PKIX path building failed: sun.security.provider.certpath.Sun

qq_41092501 2019-10-11 07:04:02
在用IDEA新建springboot项目时maven请求远程仓库下载依赖包时报错:
Non-resolvable parent POM for team.legend:jobhunter:0.0.1-SNAPSHOT: Could not transfer artifact org.springframework.boot:spring-boot-starter-parent:pom:2.1.9.RELEASE from/to alimaven (http://maven.a
liyun.com/nexus/content/repositories/central/): sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certificati
on path to requested target and 'parent.relativePath' points at no local POM @ line 5, column 13 -> [Help 2]


个人预测原因是SSL证书验证失败,但是在进入目标网址下载证书,用keytool手动导入后依然无法解决该错误,希望有大神能帮忙提供一点解决的思路
网上还提供了一个原因可能是jdk版本的问题,但是我的jdk版本是1.8u_201,应该没有问题。。。
下面贴上全部报错日志,感谢各位大神们了!!!

```
E:\JetBrains\IDEA_prj\jobhunter>mvn install
[INFO] Scanning for projects...
Downloading from alimaven: http://maven.aliyun.com/nexus/content/repositories/central/org/springframework/boot/spring-boot-starter-parent/2.1.9.RELEASE/spring-boot-starter-parent-2.1.9.RELEASE.pom
[ERROR] [ERROR] Some problems were encountered while processing the POMs:
[FATAL] Non-resolvable parent POM for team.legend:jobhunter:0.0.1-SNAPSHOT: Could not transfer artifact org.springframework.boot:spring-boot-starter-parent:pom:2.1.9.RELEASE from/to alimaven (http://maven.aliyu
n.com/nexus/content/repositories/central/): sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification p
ath 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 team.legend:jobhunter:0.0.1-SNAPSHOT (E:\JetBrains\IDEA_prj\jobhunter\pom.xml) has 1 error
[ERROR] Non-resolvable parent POM for team.legend:jobhunter:0.0.1-SNAPSHOT: Could not transfer artifact org.springframework.boot:spring-boot-starter-parent:pom:2.1.9.RELEASE from/to alimaven (http://maven.a
liyun.com/nexus/content/repositories/central/): sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certificati
on 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
...全文
1692 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
  • 打赏
  • 举报
回复

按照我小白的经验我解不开,但是我在idea设置了跳过证书检验,就可以啦

  • 打赏
  • 举报
回复
pkix问题直接重装系统会不会解决这个问题?求解
打过一群鸭ya 2020-04-18
  • 打赏
  • 举报
回复
你好,你怎么导入证书呢? 阿里的maven库证书?可不可以提供一下教程,我也试试,目前面临同样的问题,很难受
程卓 2020-01-03
  • 打赏
  • 举报
回复
我也遇到了,无解
Cyzc 2019-10-21
  • 打赏
  • 举报
回复
我也是这个错误,请问有人知道怎么解决吗?

81,115

社区成员

发帖
与我相关
我的任务
社区描述
Java Web 开发
社区管理员
  • Web 开发社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧