zoukankan      html  css  js  c++  java
  • Maven依赖包下载慢--阿里云让你飞

      当用maven下载依赖包的时候,用官方的镜像库,那慢的真是要死要死的。后来在网上搜到英国的库(也是慢的不行),国内的oschina更是直接没法下载呀。不过还好突然发现阿里云也有镜像库,尝试了以下,速度真是爽到爆,和官方镜像库比,真是一个天上,一个地下。好了,不吐槽了,直接看配置。

      就是更改用户下的settings.xml文件,在<mirrors> </mirrors>中加上阿里云的镜像库

      

      <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>
          <!--This sends everything else to /public -->
          <id>nexus</id>
          <mirrorOf>*</mirrorOf> 
          <url>http://maven.aliyun.com/nexus/content/groups/public/</url>
        </mirror>
        <mirror>
          <!--This is used to direct the public snapshots repo in the 
              profile below over to a different nexus group -->
          <id>nexus-public-snapshots</id>
          <mirrorOf>public-snapshots</mirrorOf> 
          <url>http://maven.aliyun.com/nexus/content/repositories/snapshots/</url>
        </mirror>
      </mirrors>

       看看下边这速度,杠杠的:

      

      享受飞一般的感觉吧

  • 相关阅读:
    K8s PV and PVC and StorageClass
    WebSphere--WAS概念和原理解析
    K8S配置多集群访问
    ROS2学习日志:CV开发之关联Gazebo/Webots/ROS2
    CV学习日志:Orbslam使用总结
    CV学习日志:Basalt使用总结
    CV学习日志:Kalibr使用总结
    CV学习日志:CamOdoCalib使用总结
    CV学习日志:OpenVINS使用总结
    CV学习日志:搭建U2004开发环境
  • 原文地址:https://www.cnblogs.com/linux-wangkun/p/6077758.html
Copyright © 2011-2022 走看看