maven镜像设置,设置成阿里的镜像仓库,取代中央仓库


 在maven配置文件中加入以下配置,maven就不会使用中央仓库,而是会在阿里的镜像仓库上下载jar包,速度会快很多,工作效率的体现!!!


	<mirror>  
		  <id>alimaven</id>  
		  <name>aliyun maven</name>  
		  <url>http://maven.aliyun.com/nexus/content/groups/public/</url>  
		  <mirrorOf>central</mirrorOf>          
		</mirror> 
		<mirror>
			<id>ui</id>
			<mirrorOf>central</mirrorOf>
			<name>Human Readable Name for this Mirror.</name>
			<url>http://uk.maven.org/maven2/</url>
		</mirror>
		<mirror>
            <id>osc</id>
            <mirrorOf>central</mirrorOf>
            <url>http://maven.oschina.net/content/groups/public/</url>
        </mirror>
        <mirror>
            <id>osc_thirdparty</id>
            <mirrorOf>thirdparty</mirrorOf>
            <url>http://maven.oschina.net/content/repositories/thirdparty/</url>
        </mirror>

  </mirrors>

猜你喜欢

转载自blog.csdn.net/sinat_36572927/article/details/82056691