PKIX path building failed: sun.security.provider.certpath.SunCertP athBuilderException: unable to find valid certification path to requested target
Receiving following error while creating build using Maven PKIX path building failed: sun.security.provider.certpath.SunCertP athBuilderException: unable to find valid certification path to requested target We tried resolving it with Solution 1 (, as below). But, after lots of tries - we did went with Solution 2, which is not recommended. Solution 1: Open your website in browser, click on Lock icon to export selected certificate of website to a file on your local machine. Then execute below command to import Certificate to your keystore - keytool –import –noprompt –trustcacerts –alias ALIASNAME -file /PATH/TO/YOUR/DESKTOP/CertificateName.cer -keystore /PATH/TO/YOUR/JDK/jre/lib/security/cacerts -storepass changeit You can also generate your own keystore using following command - keytool -keystore clientkeystore -genkey -alias client And, give it maven command as below - mvn package -Djavax.net.ssl.trustStore=clientkeystore But, clearly Solution 1...