Nexus的使用

修改nexus的仓库配置

配置maven的setting文件和项目的pom文件,上传jar包

配置setting.xml

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

pom添加仓库的地址

<distributionManagement>
   <snapshotRepository>
      <id>snapshots</id>
      <url>http://192.168.100.129:8081/nexus/content/repositories/snapshots</url>
   </snapshotRepository>
</distributionManagement>

使用mvn clean deploy -Dmaven.skip.test=true就可以上传了

上传完成后,在nexus管理页面就能看到刚刚上传的jar包了

 

原文地址:https://www.cnblogs.com/weianlai/p/11343948.html