1

当我尝试安装maven项目的pom.xml时,出现以下错误。请帮忙。由于InvalidAlgorithmParameterException,无法将工件从/传送到中央:trustAnchors参数必须为非空

Failed to execute goal org.apache.maven.plugins:maven-resources-plugin:2.6:resources (default-resources) on project pm: Execution default-resources of goal org.apache.maven.plugins:maven-resources-plugin:2.6:resources failed: Plugin org.apache.maven.plugins:maven-resources-plugin:2.6 or one of its dependencies could not be resolved: Could not transfer artifact classworlds:classworlds:jar:1.1 from/to central (https://repo.maven.apache.org/maven2): java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty

+0

我有同样的问题...但还没有找到解决方案:( – arcuri82

回答

1

我在远程CI服务器上编译时遇到同样的问题。最终,迫使与Maven编译时的信任库的位置解决了这个问题对我来说:

-Djavax.net.ssl.trustStore=/usr/java/jdk1.8.0_91/jre/lib/security/cacerts

的实际路径将根据您的JDK安装是不同的。

我推测(不知道),如果你有一个以上的JDK问题出现,一些老的一个没有正确的证书,并以某种方式Maven的拿起那个旧的,即使你使用了正确的javac

相关问题