[英]Maven clean install unable to get artifact from maven central
將遠程存儲庫克隆到Linux遠程計算機后,嘗試運行mvn clean install
時出現以下錯誤:
[ERROR] The build could not read 1 project -> [Help 1] [ERROR]
[ERROR] Non-resolvable parent POM: Could not transfer artifact xxxxx
from/to central (http://repo.maven.apache.org/maven2): Connection to http://repo.maven.apache.org refused and 'parent.relativePath' points at wrong local POM @ line 4, column 10: Connection timed out -> [Help 2]
[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]
[ERROR] [Help 2]
僅當在Linux上運行mvn
命令時, 才會發生這些錯誤,在Windows環境中執行mvn clean install
后,項目將成功構建。
為什么在Linux機器上會發生這種情況?
謝謝
以上消息似乎是由於網絡故障引起的。 正如您所說的那樣,它可以在Windows而不是Linux上成功構建,我設想您的Linux配置文件中必須有一些不同的網絡設置。 您曾經添加任何代理嗎? 檢查Maven代理設置,然后重試。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.