请稍等 ...
×

采纳答案成功!

向帮助你的同学说点啥吧!感谢那些助人为乐的人

我在artifactory的虚拟仓库加入了阿里云中央仓库,为什么还是从bintray下载的依赖呢?

如图,我从artifactory的虚拟仓库加入了阿里云中央仓库:

https://img1.sycdn.imooc.com//szimg/5f3dc79b09afbfb519200974.jpg

远程仓库配置如下:

https://img1.sycdn.imooc.com/szimg/5f3dc7c809a1747919200970.jpg

可看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去掉就会变得一个依赖也下载不了:

https://img1.sycdn.imooc.com//szimg/5f3f1e940990b9fa19201048.jpg

配置见下图:

https://img1.sycdn.imooc.com/szimg/5f3f1eac0907863e19200973.jpg

https://img1.sycdn.imooc.com//szimg/5f3f1ec4097ebaf519200970.jpg

是不是jcenter-aliyun的地址有问题?老师帮我看看吧,谢谢。

正在回答

2回答

你的截图我看不太清楚,如果去掉 jcenter 的远程仓库就下载不了包,说明 JCenter 远程仓库生效了,而阿里云的远程仓库没有生效。

建议:可以试试这个远程仓库地址:http://mirrors.aliyuncs.com,或者https://maven.aliyun.com/repository/central

0 回复 有任何疑惑可以回复我~
  • 成功了,老师,谢谢。这个网页:https://maven.aliyun.com/mvn/guide 上有配置远程仓库的地址,我没有配好是因为我配了地址后,点击“Test”,提示404,所以就没有配;结果这个404的结果是正确的。哈哈。
    回复 有任何疑惑可以回复我~ 2020-08-21 09:52:10
  • 清风 #2
    对,它屏蔽了页面访问,但不影响maven 客户端请求
    回复 有任何疑惑可以回复我~ 2020-08-21 09:54:07
清风 2020-08-20 20:46:45

可能是阿里云没有这个包,才会去下一个仓库jcenter 去找。你试试把jcenter 远程仓库从虚拟仓库里去掉,看看什么效果

0 回复 有任何疑惑可以回复我~
  • 见ps(2020-08-21),我把jcenter去掉就会变得一个依赖也下载不了。是不是jcenter-aliyun的地址有问题?老师帮我看看阿里云的远程仓库应该怎样在artifactory里填写吧,谢谢。
    回复 有任何疑惑可以回复我~ 2020-08-21 09:11:52
问题已解决,确定采纳
还有疑问,暂不采纳
意见反馈 帮助中心 APP下载
官方微信