Maven配置阿里云镜像

Maven默认中央仓库下载jar包在国内可能会很慢,我们可以通过未Maven配置国内阿里云镜像提高jar包下载速度。

  1. 修改setting.xml,在mirrors节点下加入一个新的mirror节点,配置阿里镜像地址,完整配置如下:

     
     	
    		nexus-aliyun
    		central
    		Nexus aliyun
    		http://maven.aliyun.com/nexus/content/groups/public
    	 
      
    
  2. 修改项目pom.xml,在repositories节点下加入repository节点,配置阿里镜像地址,完整配置如下:

    
    
        
        	
            nexus-aliyun
            
            Nexus aliyun
            
            http://maven.aliyun.com/nexus/content/groups/public
        
    
    

你可能感兴趣的:(Maven)