在構建SpringBoot項目時,maven下載依賴會報 PKIX path building failed: sun.security.provider.certpath的錯誤。
使用https://blog.csdn.net/HuanglnQuan/article/details/104594117這篇文章的方法得以解決。
mvn clean && mvn compile -Dmaven.wagon.http.ssl.insecure=true -Dmaven.wagon.http.ssl.allowall=true -Dmaven.wagon.http.ssl.ignore.validity.dates=true
不過再使用命令時會出現新的錯誤
Unknown lifecycle phase "&&". You must specify a valid lifecycle phase or a goal in the format <plu
去掉mvn clean &&,就成功開始下載依賴了......