maven远程私服发布jar包

  1. 配置项目POM.xml

     <distributionManagement>
         <repository>
             <id>nexus-releases</id>
             <url>http://127.0.0.1:8081/nexus/content/groups/public</url>
         </repository>
         <snapshotRepository>
             <id>nexus-snapshots</id>
             <url>http://127.0.0.1:8081/nexus/content/repositories/snapshots</url>
         </snapshotRepository>
    
     </distributionManagement>
    
  2. 配置nexus的用户名密码

     <servers>
         <server>  
             <id>nexus-releases</id>  
             <username>admin</username>  
             <password>Admin@123</password>  
         </server>  
         <server>  
             <id>nexus-snapshots</id>  
             <username>admin</username>  
             <password>Admin@123</password>  
         </server> 
       </servers>
    
  3. 指向maven发布命令

    maven deploy或执行IDEA模块maven的deploy指令

posted @ 2016-11-09 15:21  浪荡小新  阅读(452)  评论(0编辑  收藏  举报