maven 配置了阿里云,为什么下载依赖的时候还是从maven中心库下载呢?

来源:2-11 聚合工程整合SpringBoot

weibo_晓晓9小_0

2020-05-20 06:55:12

maven配置文件:   

<mirror>

        <id>nexus-aliyun</id>

        <mirrorOf>central</mirrorOf>

        <name>Nexus aliyun</name>

        <url>http://maven.aliyun.com/nexus/content/groups/public</url>

    </mirror>


    <!-- 备选镜像,也是可以通过 url 去查找确定一下,

        该镜像是否含有你想要的包,它比 spring-libs-milestone 快  -->

    <mirror>

        <id>central-repository</id>

        <mirrorOf>*</mirrorOf>

        <name>Central Repository</name>

        <url>http://central.maven.org/maven2/</url>

    </mirror>

-----

运行install后的日志:

ding from central: https://repo.maven.apache.org/maven2/org/springframework/spring-aop/5.1.7.RELEASE/spring-aop-5.1.7.RELEASE.jar

Downloaded from central: https://repo.maven.apache.org/maven2/org/springframework/spring-aop/5.1.7.RELEASE/spring-aop-5.1.7.RELEASE.jar (369 kB at 11 kB/s)

Downloading from central: https://repo.maven.apache.org/maven2/org/aspectj/aspectjweaver/1.9.4/aspectjweaver-1.9.4.jar



写回答

1回答

风间影月

2020-05-20

最近一段时间我用阿里的镜像会有问题,所以一直没用,用的默认的,其实速度也很快。至于阿里镜像的使用,直接百度贴一份配置即可

0

Java架构师-技术专家

千万级电商项目从0到100全过程,覆盖Java程序员不同成长阶段的核心问题与解决方案

2672 学习 · 5839 问题

查看课程