标签:
Nexus只需下载war包放到tomcat服务器上便可。
项目pom文件配置distributionManagement
<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>
settings.xml配置账号密码。注意server的id与repository的id必须对应
<servers> <server> <id>releases</id> <username>admin</username> <password>admin123</password> </server> <server> <id>snapshots</id> <username>admin</username> <password>admin123</password> </server> </servers>
[INFO] --- maven-deploy-plugin:2.7:deploy (default-deploy) @ tenpay ---
Uploading: http://localhost:8081/nexus/content/repositories/releases/com/capital/tenpay/1.2/tenpay-1.2.jar
Uploading: http://localhost:8081/nexus/content/repositories/releases/com/capital/tenpay/1.2/tenpay-1.2.pom
Uploaded: http://localhost:8081/nexus/content/repositories/releases/com/capital/tenpay/1.2/tenpay-1.2.pom (2 KB at 9.7 KB/sec)
Uploaded:
http://localhost:8081/nexus/content/repositories/releases/com/capital/tenpay/1.2/tenpay-1.2.jar
(39 KB at 124.4 KB/sec)
Downloading: http://localhost:8081/nexus/content/repositories/releases/com/capital/tenpay/maven-metadata.xml
Downloaded:
http://localhost:8081/nexus/content/repositories/releases/com/capital/tenpay/maven-metadata.xml
(347 B at 4.3 KB/sec)
Uploading: http://localhost:8081/nexus/content/repositories/releases/com/capital/tenpay/maven-metadata.xml
Uploaded: http://localhost:8081/nexus/content/repositories/releases/com/capital/tenpay/maven-metadata.xml (376 B at 7.8 KB/sec)
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
http://my.oschina.net/xiaokaceng/blog/169530
标签:
原文地址:http://www.cnblogs.com/milton/p/4391292.html