maven下载慢怎么解决

工作中,我们新建项目,下载jar包速度缓慢而苦恼,这十分影响开发效率,这是由于maven默认会同国外网络进行下载,那么有什么方法可以让下载速度变快呢?很简单,我们将下载途径变成国内的网络就可以。

方法:

maven是支持镜像的,我们可以在${maven_home}的conf目录下的setting.xml文件中找到标签,然后添加如下配置


    
      alimaven
      aliyun maven
      http://maven.aliyun.com/nexus/content/groups/public/
      central        
    
  

常用的maven国内镜像

  
      CN    
      OSChina Central                                                                                                                           
      http://maven.oschina.net/content/groups/public/    
      central  
      
          
          repo2      
          central      
          Human Readable Name for this Mirror.      
          http://repo2.maven.org/maven2/      
          
          
          net-cn      
          central      
          Human Readable Name for this Mirror.      
          http://maven.net.cn/content/groups/public/       
          
          
          ui      
          central      
          Human Readable Name for this Mirror.      
         http://uk.maven.org/maven2/      
          
          
          ibiblio      
          central      
          Human Readable Name for this Mirror.      
         http://mirrors.ibiblio.org/pub/mirrors/maven2/      
          
          
          jboss-public-repository-group      
          central      
          JBoss Public Repository Group      
         http://repository.jboss.org/nexus/content/groups/public      
        
        
        
          
          JBossJBPM  
          central  
          JBossJBPM Repository  
          https://repository.jboss.org/nexus/content/repositories/releases/  
      
               
          antelink  
          central  
          antelink Repository  
          http://maven.antelink.com/content/repositories/central/  
      
          
          openkoala  
          central  
          openkoala Repository  
          http://nexus.openkoala.org/nexus/content/groups/Koala-release/  
      
          
          tmatesoft  
          central  
          tmatesoft Repository  
          http://maven.tmatesoft.com/content/groups/public/  
      
          
          mavensync  
          central  
          mavensync Repository  
          http://mavensync.zkoss.org/maven2/  
    

你可能感兴趣的:(开发工具)