代码语言:javascript复制xml文件project标签下加入:
<distributionManagement>
<repository>
<id>nexus-releases</id>
<name>nexus release repo</name>
<url>http://localhost:9001/nexus/content/repositories/releases/</url>
</repository>
<snapshotRepository>
<id>nexus-snapshots</id>
<name>nexus snapshot repo</name>
<url>http://localhost:9001/nexus/content/repositories/snapshots/</url>
</snapshotRepository>
</distributionManagement>
代码语言:javascript复制.../conf/setting.xml:
<servers>
<server>
<!-- 对应pom中的id -->
<id>nexus-snapshots</id>
<username>admin</username>
<password>admin123,默认密码</password>
<!--<privateKey>nexus-snapshots</privateKey>-->
<!--<passphrase>admin123</passphrase>-->
</server>
<server>
<id>nexus-releases</id>
<username>admin</username>
<password>admin123</password>
</server>
</servers>
mvn clean deploy