1、pom.xml配置
<distributionManagement> <repository> <id>nexus-releases</id> <name>Nexus Release Repository</name> <url>http://ip/nexus/content/repositories/releases/</url> </repository> <snapshotRepository> <id>nexus-snapshots</id> <name>Nexus Snapshot Repository</name> <url>http://ip/nexus/content/repositories/snapshots/</url> </snapshotRepository> </distributionManagement>
2、setting.xml文件
<server> <id>nexus-releases</id> <username>admin</username> <password>admin123</password> </server> <server> <id>nexus-snapshots</id> <username>admin</username> <password>admin123</password> </server>
3、进入pom.xml所在目录执行 mvn deploy