Linux搭建nexus私人仓库,并上传下载maven jar

1.nexus私人仓库安装启动

# 下载nexus
https://download.sonatype.com/nexus/oss/nexus-2.14.10-01-bundle.tar.gz

tar -zvxf nexus-2.14.10-01-bundle.tar.gz

# 修改RUN_AS_USER
vim bin/nexus
RUN_AS_USER=root     
         
# 启动nexus
./bin/nexus start 

# 访问
http://172.22.2.133:8081/nexus/
用户名: admin 密码: admin123

2.上传maven jar

# 本地maven配置

    releases
    admin
    admin123


    snapshots
    admin
    admin123


# maven源码pom.xml文件添加配置

    
        releases
        http://172.22.2.133:8081/nexus/content/repositories/releases/
    

    
        snapshots
        http://172.22.2.133:8081/nexus/content/repositories/snapshots/
    


# 上传
mvn deploy

3.下载Maven jar

# 本地Maven配置
   
       
        activeProfile   
           
              
                public   
                http://172.22.2.133:8081/nexus/content/groups/public/   
                   
                    true   
                
                   
                    true   
                   
               
          
          
              
                public  
                http://172.22.2.133:8081/nexus/content/groups/public/  
              
          
      



    activeProfile

你可能感兴趣的:(javaweb)