[英]making multiple maven mirror repositories
I have set up an artifactory and made 3 repositories in it namely A,B and C . 我已经建立了一个神器并在其中创建了3个存储库,即A,B和C. Now in my settings.xml file I have configured A to be a mirror of everything as: 现在在我的settings.xml文件中,我已将A配置为所有内容的镜像:
<mirror>
<id>myRepo</id>
<name>remote repo</name>
<url>http://<url>:<port>/artifactory/A</url>
<mirrorOf>*</mirrorOf>
</mirror>
Now each time I build , maven only looks for artifacts under A and not those under B or C . 现在我每次构建时,maven只会在A下查找工件而不是B或C下的工件。 So is there a way to ensure that B and C are also looked up alongwith A? 那么有没有办法确保B和C也与A一起查找? I tried keeping multiple entries for mirror but since each would have same <mirrorOf>
values so it wouldn't be picked up by Maven. 我尝试为镜像保留多个条目,但因为每个条目都具有相同的<mirrorOf>
值,所以它不会被Maven拾取。 I came across this : Maven doc to mirror and found that , " A single mirror can handle multiple repositories when used in conjunction with a repository manager. " Since I am already using an artifactory with 3 repositories, I can't figure out how to configure it there? 我遇到了这个问题: Maven doc镜像并发现,“ 当与存储库管理器一起使用时 , 单个镜像可以处理多个存储库。 ”由于我已经使用了具有3个存储库的工件,我无法弄清楚如何配置它吗?
You should define a virtual repository , which will resolve to A, B and C and configure your mirror settings to this repository. 您应该定义一个虚拟存储库 ,它将解析为A,B和C并将镜像设置配置到此存储库。 The simplest way to get your settings file right is just to generate it in Artifactory. 获取设置文件的最简单方法就是在Artifactory中生成它 。
PS Please also note the caveat when using mirror-any. PS请注意使用mirror-any时的警告 。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.