<?xml version="1.0" encoding="utf-8"?> <settings xmlns="http://maven.apache.org/SETTINGS/1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd"> <localRepository>/home/iteblog/repo</localRepository> <servers> <server> <id>releases</id> <username>ali</username> <password>ali</password> </server> </servers>     <profiles> <profile> <id>ali</id> <repositories> <repository> <id>central</id> <url>https://maven.aliyun.com/repository/central/</url> <releases> <enabled>true</enabled> <updatePolicy>always</updatePolicy> </releases> <snapshots> <enabled>true</enabled> <updatePolicy>always</updatePolicy> </snapshots> </repository> </repositories> <pluginRepositories> <pluginRepository> <id>ali</id> <url>https://maven.aliyun.com/repository/central/</url> <releases> <enabled>true</enabled> <updatePolicy>always</updatePolicy> </releases> <snapshots> <enabled>true</enabled> <updatePolicy>always</updatePolicy> </snapshots> </pluginRepository> </pluginRepositories> </profile> </profiles> <activeProfiles> <activeProfile>ali</activeProfile> </activeProfiles> </settings>

然后使用Maven编译你的代码,这时候Maven会从阿里云上面下载Jar依赖,速度明显要比默认的快多了!

其他Maven仓库

我们还可以设置以下的Maven仓库地址,如下:

<mirrors>
    <mirror>
      <id>wso2maven</id>
      <name>wso2 maven</name>
      <url>http://maven.wso2.org/nexus/content/groups/public/</url>
      <mirrorof>central</mirrorof>        
    </mirror>
</mirrors>

替换上最上面阿里云Maven仓库地址即可。以下的地址也可以使用:

http://maven.wso2.org/nexus/content/groups/public/
http://jcenter.bintray.com/
http://maven.antelink.com/content/repositories/central/
http://maven.springframework.org/release/
http://maven.antelink.com/content/repositories/central/
http://mavensync.zkoss.org/maven2/
http://repository.jboss.com/maven2/
http://maven.aliyun.com/nexus/content/groups/public
http://uk.maven.org/maven2/
http://repo1.maven.org/maven2/
http://maven.springframework.org/milestone
http://maven.jeecg.org/nexus/content/repositories/
https://repository.apache.org/content/groups/public/
https://repository.jboss.org/nexus/content/repositories/releases/    
http://repo.maven.apache.org/maven2
https://oss.sonatype.org/content/repositories
http://repo.spring.io/release/
http://repo.spring.io/snapshot/
本博客文章除特别声明,全部都是原创!
原创文章版权归过往记忆大数据(过往记忆)所有,未经许可不得转载。
本文链接: 【推荐几个国内访问比较快的Maven仓库镜像】(https://www.iteblog.com/archives/2022.html)
喜欢 (6)
分享 (0)
发表我的评论
取消评论

表情
本博客评论系统带有自动识别垃圾评论功能,请写一些有意义的评论,谢谢!
(1)个小伙伴在吐槽
  1. 感谢分享~~~

    恩要哦是搞咯2017-02-21 20:17 回复