- 修改settings.xml
settings.xml
<servers>
<server>
<id>nexus-i8</id>
<username>admin</username>
<password>123456</password>
</server>
</servers>
- 在自己的maven项目中添加如下配置
pom.xml
<distributionManagement>
<repository>
<id>nexus-i8</id>
<name>maven-releases</name>
<url>http://172.16.0.254:9111/repository/maven-releases/</url>
</repository>
<snapshotRepository>
<id>nexus-i8</id>
<name>maven-snapshots</name>
<url>http://172.16.0.254:9111/repository/maven-snapshots/</url>
</snapshotRepository>
</distributionManagement>
执行:
mvn deploy
完成