我在artifactory的虚拟仓库加入了阿里云中央仓库,为什么还是从bintray下载的依赖呢?
来源:5-2 搭建Maven私服

他门说这就是人生
2020-08-20
如图,我从artifactory的虚拟仓库加入了阿里云中央仓库:
远程仓库配置如下:
可看docker日志,依赖还是从jcenter的远程仓库下载的,请老师帮我分析一下可能的原因,docker日志如下:
2020-08-19 10:22:17,413 [http-nio-8081-exec-7] [INFO ] (o.a.r.HttpRepo :420) - jcenter downloading https://jcenter.bintray.com/org/hibernate/common/hibernate-commons-annotations/5.0.4.Final/hibernate-commons-annotations-5.0.4.Final.pom 1.88 KB 2020-08-19 10:22:17,460 [http-nio-8081-exec-7] [INFO ] (o.a.r.HttpRepo :433) - jcenter downloaded https://jcenter.bintray.com/org/hibernate/common/hibernate-commons-annotations/5.0.4.Final/hibernate-commons-annotations-5.0.4.Final.pom 1.88 KB at 41.39 KB/sec 2020-08-19 10:22:18,130 [http-nio-8081-exec-4] [INFO ] (o.a.r.HttpRepo :420) - jcenter downloading https://jcenter.bintray.com/org/springframework/data/spring-data-jpa/2.1.6.RELEASE/spring-data-jpa-2.1.6.RELEASE.pom 12.68 KB 2020-08-19 10:22:18,611 [http-nio-8081-exec-4] [INFO ] (o.a.r.HttpRepo :433) - jcenter downloaded https://jcenter.bintray.com/org/springframework/data/spring-data-jpa/2.1.6.RELEASE/spring-data-jpa-2.1.6.RELEASE.pom 12.68 KB at 26.51 KB/sec 2020-08-19 10:22:19,272 [http-nio-8081-exec-1] [INFO ] (o.a.r.HttpRepo :420) - jcenter downloading https://jcenter.bintray.com/org/springframework/data/build/spring-data-parent/2.1.6.RELEASE/spring-data-parent-2.1.6.RELEASE.pom 28.69 KB 2020-08-19 10:22:19,991 [http-nio-8081-exec-1] [INFO ] (o.a.r.HttpRepo :433) - jcenter downloaded https://jcenter.bintray.com/org/springframework/data/build/spring-data-parent/2.1.6.RELEASE/spring-data-parent-2.1.6.RELEASE.pom 28.69 KB at 39.93 KB/sec 2020-08-19 10:22:20,970 [http-nio-8081-exec-8] [INFO ] (o.a.r.HttpRepo :420) - jcenter downloading https://jcenter.bintray.com/org/springframework/data/spring-data-commons/2.1.6.RELEASE/spring-data-commons-2.1.6.RELEASE.pom 9.73 KB 2020-08-19 10:22:21,003 [http-nio-8081-exec-8] [INFO ] (o.a.r.HttpRepo :433) - jcenter downloaded https://jcenter.bintray.com/org/springframework/data/spring-data-commons/2.1.6.RELEASE/spring-data-commons-2.1.6.RELEASE.pom 9.73 KB at 305.51 KB/sec 2020-08-19 10:22:21,906 [http-nio-8081-exec-9] [INFO ] (o.a.r.HttpRepo :420) - jcenter downloading https://jcenter.bintray.com/org/springframework/spring-orm/5.1.6.RELEASE/spring-orm-5.1.6.RELEASE.pom 3.54 KB 2020-08-19 10:22:21,940 [http-nio-8081-exec-9] [INFO ] (o.a.r.HttpRepo :433) - jcenter downloaded https://jcenter.bintray.com/org/springframework/spring-orm/5.1.6.RELEASE/spring-orm-5.1.6.RELEASE.pom 3.54 KB at 108.66 KB/sec
ps(2020-08-21):
我把jcenter去掉就会变得一个依赖也下载不了:
配置见下图:
是不是jcenter-aliyun的地址有问题?老师帮我看看吧,谢谢。
写回答
2回答
-
你的截图我看不太清楚,如果去掉 jcenter 的远程仓库就下载不了包,说明 JCenter 远程仓库生效了,而阿里云的远程仓库没有生效。
建议:可以试试这个远程仓库地址:http://mirrors.aliyuncs.com,或者https://maven.aliyun.com/repository/central
022020-08-21 -
清风
2020-08-20
可能是阿里云没有这个包,才会去下一个仓库jcenter 去找。你试试把jcenter 远程仓库从虚拟仓库里去掉,看看什么效果
012020-08-21
相似问题