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.

Benno
  • 289
  • 1
  • 3
  • 10
  • 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 – StaticNoiseLog Feb 07 '17 at 15:35

1 Answers1

36

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

Bruce
  • 8,609
  • 8
  • 54
  • 83
  • 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. – Rajan Chauhan Apr 08 '20 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 https://stackoverflow.com/questions/35105667/failed-to-read-artifact-descriptor-intellij/44715063 – Michal Špondr Oct 05 '20 at 07:52
  • Great, Thanks for the answer. It saves my day. – Ashish Karn May 27 '21 at 05:50