0

I am reloading a maven project in IDEA when the error occurs.

The error description is:

Could not transfer artifact org.apache.parquet:parquet-common:pom:1.11.1-h0.gdd.maem.V100R023C00.r1-SNAPSHOT from/to mae-cloudsop-repo (https://cmc.centralrepo.rnd.konglb.com/artifactory/product_maven/): PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

I have imported the certificate as the adopted answer. And I try to install the maven project in command line by "mvn -U clean install". It builds success. But reloading maven projects in IDEA still throw the error.

My java version is 1.8 and maven version is 3.6.0.

LeeDerson
  • 47
  • 1
  • 5

1 Answers1

4

IDE launches the Maven goals with the JDK you choose in the Settings (Preferences on macOS) | Build, Execution, Deployment | Build Tools | Maven | Importing | JDK for importer settings. This error happens when the JVM tries to use non-trusted self-signed certificate.

It is likely that the proxy server in your network replaces the remote certificate with its own self-signed. So you need to import your certificate into the JDK trust store which you use to build by Maven (JDK for importer setting).

Andrey
  • 15,144
  • 25
  • 91
  • 187
  • I imported the certificate into the JDK 1.8. But the JDK for importer setting in IDEA is 1.9. After I choose the 1.8 for importer setting. It fixes. Thanks. I have another question. When installing maven project by "mvn -U clean install" in command line, which setting.xml is used? The one in user/.m2 or the one in maven/conf? – LeeDerson Mar 22 '22 at 01:10