Maven settings 开源中国 镜像并下载本地仓库
2015-12-24 01:07
218 查看
如果还没配置好Maven的朋友请先配置好Maven,配置Maven点击:/article/10035302.html
Maven settings文件里面的配置的镜像默认是国外的,由于大天朝的原因呢,下载国外的东西是很慢的,并且很容易出现中断或者下载失败的原因,
基于这个原因呢,2012年,开源中国终于弄了个China镜像,方便国内的Maven使用者:
配置如下:
第一:
第二:
第三:
创建本地仓库目录(目录必须事先建好)
然后打开dos命令:
执行:mvn help:system
坐等jar包下到本地仓库吧
Maven settings文件里面的配置的镜像默认是国外的,由于大天朝的原因呢,下载国外的东西是很慢的,并且很容易出现中断或者下载失败的原因,
基于这个原因呢,2012年,开源中国终于弄了个China镜像,方便国内的Maven使用者:
配置如下:
第一:
<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>nexus-osc</id> <mirrorOf>central</mirrorOf> <name>Nexus osc</name> <url>http://maven.oschina.net/content/groups/public/</url> </mirror> <mirror> <id>nexus-osc-thirdparty</id> <mirrorOf>thirdparty</mirrorOf> <name>Nexus osc thirdparty</name> <url>http://maven.oschina.net/content/repositories/thirdparty/</url> </mirror> </mirrors>
第二:
<profile> <id>jdk-1.4</id> <activation> <jdk>1.4</jdk> </activation> <repositories> <repository> <id>nexus</id> <name>local private nexus</name> <url>http://maven.oschina.net/content/groups/public/</url> <releases> <enabled>true</enabled> </releases> <snapshots> <enabled>false</enabled> </snapshots> </repository> </repositories> <pluginRepositories> <pluginRepository> <id>nexus</id> <name>local private nexus</name> <url>http://maven.oschina.net/content/groups/public/</url> <releases> <enabled>true</enabled> </releases> <snapshots> <enabled>false</enabled> </snapshots> </pluginRepository> </pluginRepositories> </profile> <profile> <id>osc</id> <activation> <activeByDefault>true</activeByDefault> </activation> <repositories> <repository> <id>osc</id> <url>http://maven.oschina.net/content/groups/public/</url> </repository> <repository> <id>osc_thirdparty</id> <url>http://maven.oschina.net/content/repositories/thirdparty/</url> </repository> </repositories> <pluginRepositories> <pluginRepository> <id>osc</id> <url>http://maven.oschina.net/content/groups/public/</url> </pluginRepository> </pluginRepositories> </profile>
第三:
创建本地仓库目录(目录必须事先建好)
<localRepository>本地仓库路径</localRepository>
然后打开dos命令:
执行:mvn help:system
坐等jar包下到本地仓库吧
相关文章推荐
- [ISUX译]iOS 9人机界面指南(一):UI设计基础
- HTTP协议
- 日期的格式,你用得对吗?
- ZOJ 1049 I Think I Need a Houseboat
- Result Maps collection already contains value for xxxMapper.BaseResultMap错误解决办法
- win7配置maven环境变量
- Block的简介和简单原理
- 网络编程:Reactor与Proactor的概念
- 不好好说话版原理(二)ORACLE数据库的连接
- Block在ARC和非ARC中的使用
- 删除linux系统服务
- android的线性布局
- echarts中显示效果option中必有的属性
- ASP.NET中最保险最环保的返回404的方法
- Kafka入门
- iis7+ 禁止IP访问设置方法
- 手机刷机软件与ROM的盈利模式分析
- 不好好说话版原理(一)SSH验证原理
- 使用ida调试dex文件
- 在线旅游网站发展趋势分析