设置 maven 项目时出现安全错误 - java.security.InvalidAlgorithmParameterException

问题描述

我是 maven 新手,并且是第一次设置 maven。我在使用 Java 时遇到以下错误并点击 mvn install 命令。

Plugin org.apache.maven.plugins:maven-clean-plugin:2.5 or one of its dependencies Could not be resolved: Failed to read artifact descriptor for
org.apache.maven.plugins:maven-clean-plugin:jar:2.5: Could not transfer artifact org.apache.maven.plugins:maven-clean-plugin:pom:2.5 from/to central (ht
tps://repo.maven.apache.org/maven2): transfer Failed for https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-clean-plugin/2.5/maven-clea
n-plugin-2.5.pom: java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non
-empty -

解决方法

这比在这里直接回答要好...... make a settings.xml in a hidden folder in your home for Maven