Nexus上传部署构件

如果在windows命令行中上传:

需要在全局的setting.xml文件中设置:
 

setting配置如下:


  
  C:\Development\Library\Maven\repository\XHealthSystem-Dev
  
  

  

  
    
      
      maven-public
      
      admin
      huanqiu888
    

    
      maven-snapshots
      admin
      huanqiu888
    
  


  
  
	  
	    mirrorId
	      nexus
	      http://47.166.191.218:8081/repository/maven-public/
	      *
	      
	  
  
  
  
    
      nexus
      
        
          nexus
          Nexus
          http://47.166.191.218:8081/repository/maven-releases/
          
            true
          
          
            true
          
        
      
      
        
          nexus
          Nexus
          http://47.166.191.218:8081/repository/maven-snapshots/
          
            true
          
          
            true
          
        
      
    
  




  
    nexus
  

项目的代码:


  4.0.0
  com.jesse.test
  project-c
  0.0.1-SNAPSHOT
  
  
     
     
     
     
     
     	
		  antlr
		  antlr
		  2.7.7
		
     
     
     
     
     
           
           
                maven-public   
                
                Proj Release Repository
                http://47.166.191.218:8081/repository/maven-releases
                
           
           
           
                maven-snapshots
                
                Proj Release snapshot
                http://47.166.191.218:8081/repository/maven-snapshots  
                
           
     
     

====
1.project-c为jar的包名,在发布之前可以先搜索一下,是否存在
2.mvn install 安装
3.mvn deploy 部署 
4.查看远程的仓库是否有.project-c为jar的包名,有的话说明部署成功

坑:如果遇到错误,排查setting.xml配置文件,配置了子配置文件可能会走总配置文件

你可能感兴趣的:(运维)