Search code examples
javaeclipsemavencertificatepkix

Eclipse Maven update throwing SunCertPathBuilderException


In our organization we use internal Artifactory server as maven repository. I have setup the Maven settings accordingly. Problem is when I do Maven > Update from Eclipse below error is thrown -

Failure to transfer org.apache.maven.plugins:maven-resources-plugin:pom:2.6 from https://.../artifactory/public was cached in the local repository, resolution will not be reattempted until the update interval of artifactory has elapsed or updates are forced. Original error: Could not transfer artifact org.apache.maven.plugins:maven-resources-plugin:pom:2.6 from/to artifactory (https://.../artifactory/public): sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

This is what I have tried so far -

  • Imported the Artifactory server certificate manually using keytool in Java cacerts.
  • Ensured that Eclipse setting is pointing to respective Maven and JDK installations.
  • Deleted m2_repo and rebuilt
  • Deleted eclipse setup and setup afresh
  • Restarted system

When I run Maven from command prompt it works fine. What am I missing here?


Solution

  • Issue got resolved when I tried Maven > Update with Force Update of Snapshot/Releases enabled.

    enter image description here