hadoop-2.7.1编译native lib过程当中,运行mvn package -Pdist,native -Dskiptests -Dtar 的时候遭遇各类maven-plugin失败,提示:html
repo.maven.apache.org timeout,缘由是国内链接这个URL失败,翻过长城能够顺利链接。apache
解决办法:eclipse
修改 /path-to-maven/conf/setting.xml,参照:http://maven.apache.org/guides/mini/guide-mirror-settings.html,添加mirror:maven
<mirror>ide
<id>UK</id>oop
<name>UK Central</name>ui
<url>http://uk.maven.org/maven2</url>url
<mirrorOf>central</mirrorOf>xml
</mirror>htm
终于看到下载画面了:
若是是在公司内执行,别忘了在setting.xml中设定proxy认证信息。
该方法一样适用于eclipse中的maven设定:.m2/setting.xml