No update of Maven plugins and dependencies with company internal artifactory

Answered

Hi,

I can't really spot the problem with IntellJ. It could be the SSL Certificate or the URL.

In the exception stack I see the root problem:

Caused by: java.lang.RuntimeException: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
at java.base/sun.security.provider.certpath.SunCertPathBuilder.build(SunCertPathBuilder.java:141)
at java.base/sun.security.provider.certpath.SunCertPathBuilder.engineBuild(SunCertPathBuilder.java:126)
at java.base/java.security.cert.CertPathBuilder.build(CertPathBuilder.java:297)
at java.base/sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:434

I wonder because the company internal certifcate is configured in Tools/Server Certifcates.

Further IntelliJ tries to download a file which does not exist:

Caused by: java.lang.RuntimeException: org.apache.maven.wagon.TransferFailedException: Transfer failed for https://[company-url]/.index/nexus-maven-repository-index.properties

With Maven on the command line the updates of the Maven plugins and dependencies works as expected.

Downloading from central: https://[[company-url]/com/abc/p/maven2/pom/pom3/1-SNAPSHOT/maven-metadata.xml

Unfortenately I'm lost and can not spot the problem.

The ~/.m2/settings.xml comes from the company. The certifcates are stored in /usr/share/ca-certificates/company/*.crt.

As BED/Build Tools/Maven/Importing JDK for importer "Use Projekct JDK" and in BED/Build Tools/Maven/Runner as JRE is "Use Projekct JDK".

How do I get IntelliJ to import Maven plugins and dependencies?

Thanks,

Markus

0
1 comment

For Reloading (importing) Maven project IDE uses the JDK, specified in the Settings (Preferences on macOS) | Build, Execution, Deployment | Build Tools | Maven | Importing | JDK for importer settings, so the certificates must be imported into the JDK specified there.

Please try to import certificate into that JDK or set there the JDK which you known for sure has these certificates already imported, e.g. the one which is used in command line by Maven, if you say it is working in command line.

0

Please sign in to leave a comment.