suppose you need to develop a feature,when you finish the feature ,you need to release the jar to Nexus,and other projects will depend on your jar file.
distributionManagement:
<distributionManagement>
<!--This element is for releasing to nexus.
The id element should match id in settings.xml file (xpath servers/server/id) which defines authentication credentials -->
<repository>
<id>release</id>
<name>releases</name>
<url>http://nexus.com/nexus/content/repositories/releases</url>
</repository>
<!-- Publish snapshots here -->
<snapshotRepository>
<uniqueVersion>false</uniqueVersion>
<id>snapshots</id>
<name>snapshots</name>
<url>http://nexus.com/nexus/content/repositories/snapshots</url>
</snapshotRepository>
</distributionManagement>
servers:
<servers>
<server>
<id>release</id>
<username>xxxx</username>
<password>xxxxx</password>
</server>
<server>
<id>snapshots</id>
<username>xxxx</username>
<password>xxxx</password>
</server>
</servers>
Good practice release jar to Nexus,布布扣,bubuko.com
Good practice release jar to Nexus
原文地址:http://www.cnblogs.com/hugeshi/p/3853262.html