<mirror>
<id>nexus</id>
<mirrorOf>*</mirrorOf>
<url>http://127.0.0.1:8081/nexus/content/groups/public/</url>
</mirror>
<repositories>
<repository>
<id>central</id>
<name>central</name>
<url>http://127.0.0.1:8081/nexus/content/groups/public/</url>
<layout>default</layout>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
</repositories>
根据nexus服务器地址,放到maven的settings.xml文件中就可以了。