标签:
1,maven/conf/settings.xml里找到severs,添加:
<server> <id>releases</id> <username>admin</username> <password>admin123</password> </server> <server> <id>snapshots</id> <username>admin</username> <password>admin123</password> </server>
2,在项目的pom.xml文件添加(id应对应nexus repository的id):
<distributionManagement> <repository> <id>releases</id> <name>Nexus Release Repository</name> <url>http://localhost:8081/nexus/content/repositories/releases/</url> </repository> <snapshotRepository> <id>snapshots</id> <name>Nexus Snapshot Repository</name> <url>http://localhost:8081/nexus/content/repositories/snapshots/</url> </snapshotRepository> </distributionManagement>
3,最后mvn deploy
标签:
原文地址:http://www.cnblogs.com/wuzhiyi/p/5216910.html