maven deploy

https://blog.csdn.net/loophome/article/details/104676581

通过mvn命令部署

maven配置

这个文件位于conf/setting.xml

<servers><server><id>nexus-snapshots</id><username>admin</username><password>admin123</password></server><server><id>nexus-releases</id><username>admin</username><password>admin123</password></server></servers>

项目配置

位于项目的pom.xml,注意这里的id必须跟setting里的id相对应

<!-- 发布maven私服 --><distributionManagement><repository><id>nexus-snapshots</id><url><http://xxxx/nexus/content/repositories/snapshots></url></repository><snapshotRepository><id>nexus-repository</id><url><http://xxx/nexus/content/repositories/releases></url></snapshotRepository></distributionManagement>

deploy命令

执行mvn clean deploy