maven 配置国内镜像

修改conf/setttings.xml文件


    
		alimaven
		aliyun maven
		http://maven.aliyun.com/nexus/content/groups/public/
		central
	
	
		uk
		central
		Human Readable Name for this Mirror.
		http://uk.maven.org/maven2/
	
	
		CN
		OSChina Central
		http://maven.oschina.net/content/groups/public/
		central
	
	
		nexus
		internal nexus repository
		http://repo.maven.apache.org/maven2
		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/       
	      
	      
		  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/  
	
  

若下载包时存在个别源下载不了,修改hosts文件

若repository.jboss.org下的包下载不了,则修改hosts文件将域名解析指向本机,强制失败后会走阿里云的源下载相关依赖包

127.0.0.1 repository.jboss.org

 

你可能感兴趣的:(Java,maven)