sun.security.validator.ValidatorException: PKIX path building failed
maven 的setting 中配置的mirrors 是http,但是aliyun自动跳转到https,所以需要导入证书
导入过程
1、编译如下的lnstallCert.java文件 javac lnstallCert.java
2、执行java InstallCert maven.aliyun.com
maven.aliyun.com为apache-maven-3.5.0/conf/settings.xml 中配置的跳转的路径
<mirror>
<id>alimaven</id>
<name>aliyun maven</name>
<url>http://maven.aliyun.com/nexus/content/groups/public/</url>
<mirrorOf>central</mirrorOf>
</mirror>
http://maven.aliyun.com/nexus/content/groups/public/跳转到
https://maven.aliyun.com/mvn/view
结果
Enter certificate to add to trusted keystore or 'q' to quit: [1]
3.输入1,然后直接回车,会在相应的目录下产生一个名为‘jssecacerts’的证书。将证书copy到$JAVA_HOME/jre/lib/security目录下cp jssecacerts /usr/java/jdk1.8.0_60/jre/lib/security/