在 IDEA 中重新加载 Maven 项目:无法找到请求目标的有效证书路径

Reloading maven projects in IDEA: unable to find valid certification path to requested target

我在IDEA中重新加载一个maven项目时出现错误

错误描述为:

无法传输工件 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 路径构建失败:sun.security.provider.certpath.SunCertPathBuilderException:无法找到请求目标的有效证书路径

我已将证书导入为 the adopted answer。我尝试通过“mvn -U clean install”在命令行中安装 maven 项目。它建立成功。但是在IDEA中重新加载maven工程还是报错

我的java版本是1.8,maven版本是3.6.0。

IDE 使用您在设置(macOS 上的首选项)中选择的 JDK 启动 Maven 目标 |构建、执行、部署 |构建工具 |行家 |进口 | JDK 用于进口商 设置。当 JVM 尝试使用 non-trusted self-signed 证书时会发生此错误。

您网络中的代理服务器很可能用自己的 self-signed 替换了远程证书。因此,您需要 import your certificate into the JDK trust store 用于由 Maven 构建(JDK for importer 设置)。