开源中国Maven镜像配置

最近时间段在弄maven的项目,发现在下载插件或依赖包时总是超时,经检查发现为连接国外网站时网速特慢,于是想找一个国内的镜像。经过谷歌之后发现了开源中国的镜像,速度还不错,于是记录下来,作为备忘。参考配置示例如下:

Xml代码   收藏代码
  1.  <mirrors>  
  2.    <mirror>  
  3.     <id>nexus-osc</id>  
  4.     <mirrorOf>central</mirrorOf>  
  5.     <name>Nexus osc</name>  
  6.     <url>http://maven.oschina.net/content/groups/public/</url>  
  7. </mirror>  
  8. <mirror>  
  9.     <id>nexus-osc-thirdparty</id>  
  10.     <mirrorOf>thirdparty</mirrorOf>  
  11.     <name>Nexus osc thirdparty</name>  
  12.     <url>http://maven.oschina.net/content/repositories/thirdparty/</url>  
  13. </mirror>  
  14.  </mirrors>  

 

Xml代码   收藏代码
  1. <profiles>  
  2.   
  3.   <profile>  
  4.     <id>jdk-1.4</id>  
  5.     <activation>  
  6.         <jdk>1.4</jdk>  
  7.     </activation>  
  8.             
  9.     <repositories>  
  10.         <repository>  
  11.             <id>nexus</id>  
  12.             <name>local private nexus</name>  
  13.             <url>http://maven.oschina.net/content/groups/public/</url>  
  14.             <releases>  
  15.                 <enabled>true</enabled>  
  16.             </releases>  
  17.             <snapshots>  
  18.                 <enabled>false</enabled>  
  19.             </snapshots>  
  20.           </repository>  
  21.     </repositories>  
  22.       <pluginRepositories>  
  23.         <pluginRepository>  
  24.             <id>nexus</id>  
  25.             <name>local private nexus</name>  
  26.             <url>http://maven.oschina.net/content/groups/public/</url>  
  27.             <releases>  
  28.                 <enabled>true</enabled>  
  29.             </releases>  
  30.             <snapshots>  
  31.                 <enabled>false</enabled>  
  32.             </snapshots>  
  33.         </pluginRepository>  
  34.       </pluginRepositories>  
  35.   </profile>  
  36.   <profile>  
  37.     <id>osc</id>  
  38.     <activation>  
  39.         <activeByDefault>true</activeByDefault>  
  40.     </activation>  
  41.     <repositories>  
  42.         <repository>  
  43.             <id>osc</id>  
  44.               <url>http://maven.oschina.net/content/groups/public/</url>  
  45.         </repository>  
  46.         <repository>  
  47.             <id>osc_thirdparty</id>  
  48.             <url>http://maven.oschina.net/content/repositories/thirdparty/</url>  
  49.         </repository>  
  50.       </repositories>  
  51.     <pluginRepositories>  
  52.         <pluginRepository>  
  53.             <id>osc</id>  
  54.             <url>http://maven.oschina.net/content/groups/public/</url>  
  55.           </pluginRepository>  
  56.     </pluginRepositories>  
  57.   </profile>  
  58. </profiles>  

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

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值