發表於 程式分享

IntelliJ IDEA maven build遇到PKIX path building failed解法

錯誤訊息:ValidatorException:PKIX path building failed : sun.security.provider.certpath.SunCertPathBuilderException : unable to find valid certification path to requested target

步驟一:Settings –> Build, Execution, Deployment –> Build Tools –> Maven –> importing 中的 VM options for importer 設定為如下

-Xmx768m -Dmaven.wagon.http.ssl.insecure=true -Dmaven.wagon.http.ssl.allowall=ture

步驟二:Settings –> Build, Execution, Deployment –> Build Tools –> Maven –> Runner 中的 VM Options 設定如下

-Dmaven.multiModuleProjectDirectory=$MAVEN_HOME  -Dmaven.wagon.http.ssl.insecure=true  -Dmaven.wagon.http.ssl.allowall=true  -Dmaven.wagon.http.ssl.ignore.validity.dates=true