maven下载太慢?

如果你觉得maven下载太慢就用国内的镜像好了

找到你安装的maven下的setting.xml

我是用homeBrew下载的,所以它的路径在下面

/usr/local/Cellar/maven@3.5/3.5.4_1/libexec/conf/setting.xml

添加

    <mirror>
      <id>alimaven</id>
      <name>aliyun maven</name>
      <url>http://maven.aliyun.com/nexus/content/groups/public/</url>
      <mirrorOf>central</mirrorOf> 
    </mirror>

到<mirrors>里
它的描述如下

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.

顺便加一下配置信息,添加到<profiles>标签

<profile> 
      <id>jdk‐1.8</id> 
      
      <activation>
        <activeByDefault>true</activeByDefault>
        <jdk>1.8</jdk> 
      </activation> 
      <properties>
        <maven.compiler.source>1.8</maven.compiler.source> 
        <maven.compiler.target>1.8</maven.compiler.target> 
        <maven.compiler.compilerVersion>1.8</maven.compiler.compilerVersion>
      </properties>
    </profile>
最后编辑于 :
©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

友情链接更多精彩内容