Unknown host error while executing MVN install

匿名 (未验证) 提交于 2019-12-03 08:28:06

问题:

I am getting below error while executing the mvn install command from command prompt.

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] 

If I try to connect toa svn repository using https://broadleaf.svn.sourceforge.net/svnroot/broadleaf I am getting below error

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

Can anyone help me?

回答1:

Are you behind a company firewall? You might need to configure proxy settings so that Maven can download the necessary dependencies.



回答2:

I was able fix this by binding the dns name with IP address in Unix /etc/hosts file.

like:

12.434.23.x  xxxx.domain.com 


标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!