Configure Maven to Skip SSL Certificate Verification

From NovaOrdis Knowledge Base
Jump to: navigation, search



If maven is configured to download dependencies from a HTTPS repository that uses self-signed certificates, it fails with:

mvn clean install
[WARNING] Could not transfer metadata org.apache.maven.plugins:maven-source-plugin/maven-metadata.xml from/to nexus \
( \
PKIX path building failed: unable to find valid certification path to requested target

Additional configuration is required to make the underlying HttpClient to ignore the SSL self-signed certificate and to proceed with the HTTP connection.

Use Maven Wagon System Properties

Set one of the following on the maven command line:

More details

TODO: Did not work.

Configure Maven to Accept Self-Signed Certificates

Configure a Java HTTP Client to Accept Self-Signed Certificates