nexus私服配置

在maven项目中,公司会有一些自己的jar包或第三方提供的jar包,这些jar包在maven的中央仓库是没有的。所以,我们需要自己的nexus私服。在某些网络极差的环境下,nexus私服也能较好地发挥它的作用。

#在项目中配置#
在pom.xml中project节点添加(localhost:8081改为私服的ip和端口号即可)


    
        nexus_public        
        http://localhost:8081/nexus/content/groups/public/        
                    
            true        
                
        
          true        
           
      
  
  
      
               nexus_public
               http://localhost:8081/nexus/content/groups/public/ 
                
                       true
                 
                 
                       true 
                 
        
   

#在全局settings.xml中配置




E:/.m2/repo

 
 
  

     
    
    
     
      nexus-public-snapshots
    
      public-snapshots
     
      http://192.168.10.92:8081/nexus/content/groups/public-snapshots
    
  
    
    
      nexus
    
      *
      http://192.168.1.200:8000/nexus/content/groups/public
     
  
  
   
  
    
      development
    
      
        
          central
      
          http://central
      
          true
      
          true
        
      
   
     
     
        
          central
          http://central
          true
          true
        
      
    
  
    
      
      public-snapshots
      
        
          public-snapshots
      
          http://public-snapshots
          false
          true
        
      
     
        
          public-snapshots
          http://public-snapshots
          false
          true
        
      
    
  
  
    
  
    
    development
  


 

0%