Maven 项目使用开源中国镜像
明明如月
从maven中央库下载jar非常缓慢甚至有时候会下载不下来。
可以采用中国的maven镜像。目前主要是 开源中国的镜像。
注意:eclipse mars版本 修改镜像后 创建maven项目quickstart容易报错
建议使用eclipse luna版本 亲测可用
1 打开配置文件
2 中间添加开源中国的配置:
CN
OSChina Central
http://maven.oschina.net/content/groups/public/
central
repo2
central
Human Readable Name for this Mirror.
http://repo2.maven.org/maven2/
osc_thirdparty
thirdparty
http://maven.oschina.net/content/repositories/thirdparty/
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
这样以后就会从开源中国或者其他仓库去下载jar包
多个配置 根基id的顺序 id是可以随意改动的 比如把cn换成A
http://maven.oschina.net/ 网站目前无法线上搜索和上传jar文件
但是 可以使用远程仓库
-----------------------------------------------------------------------------------------------------------------
从官方的消息 http://www.oschina.net/news/64847/maven-online
来看,国内罕见maven 公共镜像的原因是maven库是一个下载站,大量的jar包,对宽带要求高,成本很高。而且没有盈利模式。