maven的setting.xml配置文件, 配置私库的账号密码
<servers>
<server>
<id>jrq-releases</id>
<username>deployment</username>
<password>deployment123</password>
</server>
</servers>
项目的pom文件配置jar包上传的私库私库
<distributionManagement>
<repository>
<id>jrq-releases</id>
<name>Jrq Release Repository</name>
<url>http://10.1.2.103:9103/nexus/content/repositories/releases/</url>
</repository>
</distributionManagement>
P.S. repository id和server id要相互匹配
执行上传命令
mvn clean install deploy
网友评论