maven 国内镜像地址

由于连接国外网站时网速特慢,为解决这个问题,os china 建立了一个maven 的私服。为了记忆,特将此记录。

settings.xml 设置镜像方法步骤如下:

1. mirrors 设置

 1 <mirrors>
 2     <!-- mirror | Specifies a repository mirror site to use instead of a given
 3         repository. The repository that | this mirror serves has an ID that matches
 4         the mirrorOf element of this mirror. IDs are used | for inheritance and direct
 5         lookup purposes, and must be unique across the set of mirrors. | -->
 6     <mirror>
 7         <id>nexus-osc</id>
 8         <mirrorOf>central</mirrorOf>
 9         <name>Nexus osc</name>
10         <url>http://maven.oschina.net/content/groups/public/</url>
11     </mirror>
12     <mirror>
13         <id>nexus-osc-thirdparty</id>
14         <mirrorOf>thirdparty</mirrorOf>
15         <name>Nexus osc thirdparty</name>
16         <url>http://maven.oschina.net/content/repositories/thirdparty/</url>
17     </mirror></mirrors>

2. repositories 设置

 1 <profile>
 2                 <id>jdk-1.4</id>
 3  
 4                 <activation>
 5                     <jdk>1.4</jdk>
 6                 </activation>
 7  
 8                 <repositories>
 9                     <repository>
10                         <id>nexus</id>
11                         <name>local private nexus</name>
12                         <url>http://maven.oschina.net/content/groups/public/</url>
13                         <releases>
14                             <enabled>true</enabled>
15                         </releases>
16                         <snapshots>
17                             <enabled>false</enabled>
18                         </snapshots>
19                     </repository>
20                 </repositories>
21                 <pluginRepositories>
22                     <pluginRepository>
23                         <id>nexus</id>
24                         <name>local private nexus</name>
25                         <url>http://maven.oschina.net/content/groups/public/</url>
26                         <releases>
27                             <enabled>true</enabled>
28                         </releases>
29                         <snapshots>
30                             <enabled>false</enabled>
31                         </snapshots>
32                     </pluginRepository>
33                 </pluginRepositories>
34             </profile>

详细信息可查看:http://maven.oschina.net/help.html

转载于:https://www.cnblogs.com/thankyouGod/p/4979192.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值