maven 编译 报错PKIX path building failed-北京


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/


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM