找到nexus的release仓库和snapshot (类型为hosted)
自己模块声明的version如果包含snapshot字样则发布到snapshots,否则发布到releases库
在需要deploy的模块声明
<distributionManagement>
<repository>
<!--id的名字可以任意取,但是在setting文件中的属性<server>的ID与这里一致-->
<id>ctfo-releases</id>
<!--指向仓库类型为host(宿主仓库)的储存类型为Release的仓库-->
<url>http://172.20.72.89:8081/repository/releases/</url>
</repository>
<snapshotRepository>
<id>ctfo-snapshots</id>
<!--指向仓库类型为host(宿主仓库)的储存类型为Snapshot的仓库-->
<url>http://172.20.72.89:8081/repository/snapshots/</url>
</snapshotRepository>
setting.xml配置
<server> <id>ctfo-snapshots</id> <username>admin</username> <password>#EDC2wsx1qaz</password> </server> <server> <id>ctfo-releases</id> <username>admin</username> <password>#EDC2wsx1qaz</password> </server>
点击右边maven deploy