Maven:java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty
直接参考前面一篇文章中间介绍的第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-softwares\Java\jdk1.8.0_111
-Djavax.net.ssl.trustStore=C:\cs-softwares\Java\jdk1.8.0_111\jre\lib\security\cacerts
-Djavax.net.ssl.trustAnchors=C:\cs-softwares\Java\jdk1.8.0_111\jre\lib\security\cacerts