修改~/m2/setting.xml的profile节点
<profile>
<id>nexus</id>
<repositories>
<repository>
<id>nexus1</id>
<name>local private nexus</name>
<url>http://address/nexus/content/groups/public</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
<repository>
<id>nexus2</id>
<name>local private nexus2</name>
<url>http://address/nexus/content/groups/public</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
</repositories>
</profile>
即可从nexus私服上下载依赖组件