解决:Maven PKIX path building failed: sun.security.provider.certpath

在构建SpringBoot项目时,maven下载依赖会报 PKIX path building failed: sun.security.provider.certpath的错误。

使用https://blog.csdn.net/HuanglnQuan/article/details/104594117这篇文章的方法得以解决。

mvn clean && mvn compile -Dmaven.wagon.http.ssl.insecure=true -Dmaven.wagon.http.ssl.allowall=true -Dmaven.wagon.http.ssl.ignore.validity.dates=true

不过再使用命令时会出现新的错误

 Unknown lifecycle phase "&&". You must specify a valid lifecycle phase or a goal in the format <plu

去掉mvn clean &&,就成功开始下载依赖了......

原文地址:https://www.cnblogs.com/silentteller/p/12445434.html