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