maven私服的上传下载配置

安装私服

https://pan.baidu.com/s/1xluD2JcQitJmuq5DtJq8yw
下载并解压,管理员方式打开dos
切换到bin目录执行安装

启动服务
maven私服的上传下载配置_第1张图片
找到私服的访问url:
http://localhost:8081/nexus/#welcome

上传jar包到私服上

1、在maven目录下conf/settings.xml.认证:配置用户名密码


      releases
      admin
      admin123
    
	
      snapshots
      admin
      admin123
    

2、在将要上传的项目的pom.xml中配置jar包上传路径url


  	
  		releases
	http://localhost:8081/nexus/content/repositories/releases/
  	 
  	
  		snapshots
	http://localhost:8081/nexus/content/repositories/snapshots/
  	 
  

3、执行命令发布项目到私服(上传)
deploy

下载jar包到本地仓库

1、在maven目录下conf/settings.xml。配置模板

   
	
   dev   
       
        
	
        nexus   
		
        http://localhost:8081/nexus/content/groups/public/   
		
           
          true   
           
		
           
          true   
           
         
      
	   
    	
          
        	
            public  
            Public Repositories  
            http://localhost:8081/nexus/content/groups/public/  
          
      
    

2、激活模板


    dev
  

你可能感兴趣的:(maven私服的上传下载配置)