构建hadoop源码时,通过代理连maven中央仓库下载依赖包太慢,选择阿里云做镜像仓库,settings.xml配置也比较简洁,全部内容如下:
<?xml version="1.0" encoding="UTF-8"?>
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">
<pluginGroups></pluginGroups>
<proxies></proxies>
<servers></servers>
<mirrors>
<mirror>
<id>nexus-aliyun</id>
<mirrorOf>central</mirrorOf>
<name>Human Readable Name for this Mirror.</name>
<url>http://maven.aliyun.com/nexus/content/groups/public</url>
</mirror>
</mirrors>
<profiles></profiles>
</settings>
大概半小时即完成依赖的下载
只是依赖全部下载完成后,在编译过程中,仍包protobuf等程序包找不到的问题,该问题待解决。