本地仓库 > 私服(profile)> 远程仓库(repository)
比较优先级,只比较这三个,镜像不参与比较。确定优先级后,在看是否有匹配的镜像,有匹配则从镜像下载,无匹配则直接走相关仓库。 多个镜像,按照从下到上顺序,下面覆盖上面,依次查找,找到立即停止,上面镜像就不起作用了
maven仓库的执行顺序:
settings_mirror 的优先级高于 central
settings_profile_repo 优先级高于 settings_mirror
settings_profile_repo 优先级高于 pom_repositories
settings_profile_repo 优先级高于 pom_profile_repo
pom_profile_repo 优先级高于 pom_repositories
pom_repositories 优先级高于 settings_mirror
通过上面的比较得出完整的搜索链:
local_repo > settings_profile_repo > pom_profile_repo > pom_repositories > settings_mirror > central
注 :
0、多个mirror会按照顺序执行;第一个没有jar包或者mirrorOf没拦住,才会执行第二个;
1、在mirrorOf与repositoryId相同的时候优先是使用mirror的地址
2、mirrorOf等于*的时候覆盖所有repository配置
3、存在多个mirror配置的时候mirrorOf等于*放到最后,如果多个*,那就按照顺序执行;
4、只配置mirrorOf为central的时候可以不用配置repository
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。