8 私服相关

1 私服:
nexus搭建流程
Maven Nexus3私服搭建指南
https://www.jianshu.com/p/26626b8f9355
window 打开服务管理页面
https://www.kafan.cn/edu/88460466.html

2 关联私服
关联私服:修改 user 下的 maven 的 settings.xml配置文件
配置私服的登录账号

        
            releases
            admin
            admin123
        
        
            snapshots
            admin
            admin123
        

配置私服镜像地址

     
         nexus
         *
         http://localhost:8081/repository/maven-central/
     

配置仓库

   
         nexus
         
             
                 central
                 http://central
                 true
                 true
             
         
         
             
                 central
                 http://central
                 true
                 true
             
         
     

        nexus
    

这样配置完成 就会把jar包下到私服

3 发布项目到私服

要发布项目到nexus上要在项目中的pom.xml最后配置

给出Maven部署当前项目的构件到远程库时,关于远程库的配置。示例如下:

 
     
        releases 
        Internal Releases 
        http://localhost:8081/repository/maven-releases/ 
     
     
        snapshots 
        Internal Snapshots 
        http://localhost:8081/repository/maven-snapshots/ 
     
  

我们分别配置了release版本和snapshot版本所对应的Repository,如果你项目的版本中包含了“SNAPSHOT”,此时将发布到Nexus的Snapshots Repository,否则发布在Releases Repository

你可能感兴趣的:(8 私服相关)