当前位置:   article > 正文

PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException

pkix path building failed: sun.security.provider.certpath.suncertpathbuilder

PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target


IDEA中使用Maven构建项目时,发现架包无法自动import,然后提示为:
dependency.artifactId: *** not found
但是在中央仓库中可以发现该架包是存在的。此时使用mvn clean install后弹出错误日志:

Could not transfer artifact org.springframework.boot:spring-boot-starter-activemq:pom:2.2.4.RELEASE from/to central (https://maven.aliyun.com/nexus/content/groups/public): PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
  • 1

根据该日志可在网络上查询出错误原因:主要是ssl证书验证失败,所以可以在maven中取消掉ssl验证。具体操作如下:
Maven -> Runner -> VM Options 中添加:

-Dmaven.wagon.http.ssl.insecure=true -Dmaven.wagon.http.ssl.allowall=true -Dmaven.wagon.http.ssl.ignore.validity.dates=true
  • 1

Maven Runner

参考资料

  1. https://www.cnblogs.com/wpbxin/p/11746229.html

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/秋刀鱼在做梦/article/detail/791150
推荐阅读
相关标签
  

闽ICP备14008679号