Maven:插件org.apache.maven.plugins:maven-clean-plugin:2.5或其中一个依赖项无法解析

时间:2018-02-10 11:23:38

标签: java maven

我尝试删除.m2,删除和拉动项目,但我仍然遇到此错误。项目/ pom很好,它们可以在其他计算机上运行。

我使用的是Ubuntu 17.10,openjdk 1.8.151和maven 3.5

这里有追踪:

[INFO] Scanning for projects...
[INFO] 
[INFO] ------------------------------------------------------------------------
[INFO] Building cookieFactory 0.1
[INFO] ------------------------------------------------------------------------
Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-clean-plugin/2.5/maven-clean-plugin-2.5.pom
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.858 s
[INFO] Finished at: 2018-02-10T12:05:37+01:00
[INFO] Final Memory: 9M/212M
[INFO] ------------------------------------------------------------------------
[ERROR] 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 (https://repo.maven.apache.org/maven2): java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginResolutionException

感谢您的帮助

3 个答案:

答案 0 :(得分:0)

安装官方Oracle JDK解决了这个问题。

答案 1 :(得分:0)

对我来说,我遇到此错误是因为我将JDK版本从1.8更改为1.6,因此您可以尝试在项目配置中更改JDK版本。

答案 2 :(得分:0)

我花了一整天的时间来弄清楚这是因为jre / JDK 7不支持https,我在Windows10上安装了jre7,jdk8,jdk4。将我的JAVA_HOME更改为jdk14后,它已修复。