直接参考前面一篇文章中间介绍的第2种方法即可:Maven:sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
再 maven 命令中增加运行参数如下,路径可以改为自己的 JDK 安装路径,笔者的是:C:cs-softwaresJavajdk1.8.0_111
-Djavax.net.ssl.trustStore=C:cs-softwaresJavajdk1.8.0_111jrelibsecuritycacerts
-Djavax.net.ssl.trustAnchors=C:cs-softwaresJavajdk1.8.0_111jrelibsecuritycacerts