远程私服发布jar包

2016-11-16  本文已影响26人  老猫头
  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指令

上一篇 下一篇

猜你喜欢

热点阅读