2011-12-23 120 views
2

從命令提示符執行mvn install命令時出現以下錯誤。執行MVN安裝時出現未知主機錯誤

Plugin org.apache.maven.plugins:maven-source-plugin:1.0 or one of its dependencies could not be resolved: 
Failed to read artifact descriptor for org.apache.maven.plugins:maven-source-plugin:jar:1.0: 
Could not transfer artifact org.apache.maven.plugins:maven-source-plugin:pom:1.0 from/to central (http://repo1.maven.org/maven2): 
Error transferring file: repo1.maven.org: Unknown host repo1.maven.org -> [Help 1] 

如果我嘗試連接使用https://broadleaf.svn.sourceforge.net/svnroot/broadleaf 我得到以下錯誤TOA SVN倉庫

svn: OPTIONS request failed on '/svnroot/broadleaf/' 
Connection timed out: connect 

誰能幫助我?

+0

檢查您的網絡連接 – yatskevich 2011-12-23 10:53:40

+0

我是能夠成功連接到您所提供的鏈接。也許服務器已關閉 – 2011-12-23 10:55:31

回答

6

你在公司防火牆後面嗎?您可能需要配置proxy settings,以便Maven可以下載必要的依賴關係。

+0

謝謝它是由於防火牆!!!! – user1113253 2011-12-23 11:14:59

1

我可以通過在Unix/etc/hosts文件中將dns名稱與IP地址綁定來解決此問題。

,如:

12.434.23.x xxxx.domain.com