阿里云镜像 -国内maven
2017-01-11 00:00
225 查看
<mirrors> <!-- mirror | Specifies a repository mirror site to use instead of a given repository. The repository that | this mirror serves has an ID that matches the mirrorOf element of this mirror. IDs are used | for inheritance and direct lookup purposes, and must be unique across the set of mirrors. | <mirror> <id>mirrorId</id> <mirrorOf>repositoryId</mirrorOf> <name>Human Readable Name for this Mirror.</name> <url>http://my.repository.com/repo/path</url> </mirror> --> <mirror> <id>alimaven</id> <name>aliyun maven</name> <url>http://maven.aliyun.com/nexus/content/groups/public/</url> <mirrorOf>central</mirrorOf> </mirror> <mirror> <id>uk</id> <mirrorOf>central</mirrorOf> <name>Human Readable Name for this Mirror.</name> <url>http://uk.maven.org/maven2/</url> </mirror> <mirror> <id>CN</id> <name>OSChina Central</name> <url>http://maven.oschina.net/content/groups/public/</url> <mirrorOf>central</mirrorOf> </mirror> <mirror> <id>nexus</id> <name>internal nexus repository</name> <!-- <url>http://192.168.1.100:8081/nexus/content/groups/public/</url>--> <url>http://repo.maven.apache.org/maven2</url> <mirrorOf>central</mirrorOf> </mirror> </mirrors>
原理:maven加载jar包过程,默认的是先扫描本地仓库,若本地仓库没有,则扫描远程仓库下载。默认的conf/settings.xml文件没有配置远程仓库,所以扫描的是maven的中央仓库(在国外),所以慢。
解决方法:配置国内镜像(如阿里云的镜像)
修改conf/settings.xml文件,配置阿里云镜像代码
相关文章推荐
- maven 亲测可用国内镜像 阿里云
- maven 亲测可用国内镜像 阿里云
- 国内阿里云Maven镜像(速度飞起)
- maven 阿里云 国内镜像 中央仓库 亲测可用
- maven国内镜像 阿里云
- 170220、maven国内镜像 阿里云
- maven国内镜像 阿里云
- maven 亲测可用国内镜像 阿里云
- 国内阿里云Maven镜像(速度飞起)
- maven 国内镜像 mirror,阿里云
- maven 亲测可用国内镜像 阿里云
- maven,阿里云国内镜像,提高jar包下载速度
- maven 亲测可用国内镜像 阿里云
- maven 亲测可用国内镜像 阿里云
- maven 亲测可用国内镜像 阿里云
- maven 国内镜像——阿里云
- maven国内镜像(阿里云仓库)
- maven 亲测可用国内镜像 阿里云
- maven 阿里云 国内镜像 中央仓库 亲测可用
- maven 国内镜像 阿里云