17

In intellij (15.0.4) under settings->Maven->Repositories I get an error when clicking update on the companies repositories.

org.apache.maven.wagon.TransferFailedException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

I can understand, since it is a self-signed untrusted certificate, however, I have added this certificate to settings->Tools->Server Certificates->Accepted Certificates.

I also added to settings->Maven->Runner->VM Options -Dmaven.wagon.http.ssl.allowall=true -Dmaven.wagon.http.ssl.insecure=true

I still get this problem.

Greatful for a solution.

1
  • Adding the two VM Options to Maven Runner solved it for me (thanks for this!). No need to add the certificate to Server Certificates. IntelliJ IDEA ULTIMATE 2016.3.4 Feb 7, 2017 at 15:35

1 Answer 1

35

Update both Maven Importer and Runner in settings to allow all.

-Dmaven.wagon.http.ssl.insecure=true -Dmaven.wagon.http.ssl.allowall=true
Runner

enter image description here

Importer

enter image description here

3
  • it solved my problem too, earlier i was just updating this in maven > importing. Putting the vm option command in Runner too did the trick. Apr 8, 2020 at 11:28
  • 1
    I get "Failed to read artifact descriptor for xxx:jar:0.1.0" after I entered these in VM Options for imported. This helped stackoverflow.com/questions/35105667/… Oct 5, 2020 at 7:52
  • Great, Thanks for the answer. It saves my day. May 27, 2021 at 5:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.