簡體   English   中英

spring maven 安裝或清理錯誤,為什么?

[英]spring maven install or clean error, why?

當我為我的 spring 項目使用 maven installclean ,發生了以下錯誤。

這個問題出現在 Eclipse 2018-09 版本中。 當我使用eclipse photon版本時,沒有出現這個問題。

錯誤信息。

[INFO] Scanning for projects...
[INFO] 
[INFO] -----------------------------<  >-----------------------------
[INFO] Building  1.0.0-BUILD-SNAPSHOT
[INFO] --------------------------------    [  war ]---------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.442 s
[INFO] Finished at: 2018-12-02T23:32:35+09:00
[INFO] ------------------------------------------------------------------------
[ERROR] Plugin org.apache.maven.plugins:maven-surefire-plugin:2.12.4 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-surefire-plugin:jar:2.12.4: Could not transfer artifact org.apache.maven.plugins:maven-surefire-plugin:pom:2.12.4 from/to central (https://repo.maven.apache.org/maven2): Cannot access https://repo.maven.apache.org/maven2 with type default using the available connector factories: BasicRepositoryConnectorFactory: Cannot access https://repo.maven.apache.org/maven2 using the registered transporter factories: WagonTransporterFactory: java.util.NoSuchElementException
[ERROR]       role: org.apache.maven.wagon.Wagon
[ERROR]   roleHint: https
[ERROR] ->     [ 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

為什么不能 maven installclean

當您使用JDK7運行Maven時,似乎會出現此問題。

它一直工作到 2019 年 4 月,但隨后它停止工作,因為此錯誤導致 Maven 構建失敗。

Java 7 默認使用TLS v1 ,因此打開終端並運行 mvn 並指定TLS v1.2版本:

mvn -Dhttps.protocols=TLSv1.2 clean install

更多信息

暫無
暫無

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

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