簡體   English   中英

Maven:插件 org.apache.maven.plugins:maven-clean-plugin:2.5 或其依賴項之一無法解析

[英]Maven : Plugin org.apache.maven.plugins:maven-clean-plugin:2.5 or one of its dependencies could not be resolved

我曾嘗試刪除 .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

謝謝你的幫助

安裝官方Oracle JDK解決了這個問題。

對我來說,我有這個錯誤,因為我將 JDK 版本從 1.8 更改為 1.6,因此您可以嘗試在項目配置中更改 JDK 版本。

我花了一整天才弄清楚是因為 jre/JDK 7 不支持 https ,我在 windows10 上安裝了 jre7、jdk8、jdk4。 將我的 JAVA_HOME 指向 jdk14 后,它已修復。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM