修改maven调用的远程仓库


maven默认依赖的远程仓库位于国外服务器,可修改为国内镜像服务位置,以加快速度效率。

更多内容详见开源中国maven镜像站中帮助http://maven.oschina.net/help.html


在 Maven 中使用 OSChina 的 Maven 服务还需要简单配置一下 Maven,在 Maven 的安装目录下的 conf 文件下有个  settings.xml  文件,接下来我们需要对这个文件做简单的修改,修改前您可以简单备份下该文件。打开  settings.xml  文件,按下面内容修改


01<mirrors>
02    <!-- mirror | Specifies a repository mirror site to use instead of a given
03        repository. The repository that | this mirror serves has an ID that matches
04        the mirrorOf element of this mirror. IDs are used | for inheritance and direct
05        lookup purposes, and must be unique across the set of mirrors. | -->
06    <mirror>
07        <id>nexus-osc</id>
08        <mirrorOf>*</mirrorOf>
09        <name>Nexus osc</name>
10        <url>http://maven.oschina.net/content/groups/public/</url>
11    </mirror>
12</mirrors>
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值