maven从nexus的group仓库拉取组件规则

maven仓库拉取nexus的仓库组的规则是什么呢?如果配了多个代理仓库,是如何工作的?

打开nexus的管理员文档:https://help.sonatype.com/repomanager3/nexus-repository-administration/repository-management

Note that the order of the repositories listed in the Member section is important. When the repository manager searches for a component in a repository group, it will return the first match. To reorder a repository in this list, click and the drag the repositories and groups in the Members list or use the arrow buttons between the Available and Members list. These arrows can be used to add and remove repositories as well.
核心就一句话,它会一个一个仓库找哪个仓库有这个组件的信息,如果找到了,就不会再往下找了。

The order of repositories or other groups in a group can be used to influence the effective metadata that will be retrieved from a repository group. It is recommended practice to place hosted repositories higher in the list than proxy repositories. For proxy repositories, the repository manager may need to check the remote repository which will incur more overhead than a hosted repository lookup.
把host类型的仓库放代理仓库前面,可以更快。

It is also recommended to place repositories with a higher probability of matching the majority of components higher in this list. If most of your components are going to be retrieved from the Central Repository, putting maven-central higher in this list than a smaller, more focused repository is going to be better for performance, as the repository manager is not going to interrogate the smaller remote repository for as many missing components. These best practices are implemented in the default configuration.

把有大多数jar的仓库放前面,最好把maven中央仓库(国内就最好把ali镜像)放前面。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值