首页 > 其他 > 详细

maven 仓库下载缓慢,怎么解决

时间:2016-11-05 14:28:13      阅读:335      评论:0      收藏:0      [点我收藏+]

  maven下载jar的时候会去寻国外的地址,因此造成了下载jar很缓慢,影响开发效率;可以配置maven的镜像服务器,具体配置方式:

在maven的setting.xml中

<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-aliyun</id>
        <mirrorOf>*</mirrorOf>
        <name>Nexus aliyun</name>
        <url>http://maven.aliyun.com/nexus/content/groups/public</url>
    </mirror>
    
     
  </mirrors>

 Maven 管理 jar 包的依赖关系.各类jar包及版本可以在 Maven Central仓库 中找到. 也可以访问  mvnrepository:org.springframework.

 

maven 仓库下载缓慢,怎么解决

原文:http://www.cnblogs.com/beam-repository/p/6032796.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!