假设我们有一堆人工制品,所有这些都对
有子/传递依赖artefact{group=zambia, id=zebra}
出于我无法理解的原因,一些聪明的家伙将以前称为 artefact{group=zambia, id=zebra} 的内容更新为
artefact{group=africa, id=hello-zebra}
留下一大堆文物失去了对{zambia:zebra}的子引用
我们还要说,由于我无法解释的原因,我无法将这些父 Artifact pom 或 ivy.xml 更新为依赖于 {africa:hello-zebra}。
问题:
我的 pom 和/或 ivy.xml 中有没有办法将 {zambia:zebra} 上的任何传递依赖项重定向到 {africa:hello-zebra}?
最佳答案
我不了解 Ivy,但对于 Maven,请查看这篇文章:
http://maven.apache.org/guides/mini/guide-relocation.html
看起来使用 relocation
元素将 pom.xml 上传到旧 Artifact 的存储库可能会成功:
<project>
<modelVersion>4.0.0</modelVersion>
<groupId>zambia</groupId>
<artifactId>zebra</artifactId>
<version>????</version>
<distributionManagement>
<relocation>
<groupId>africa</groupId>
</relocation>
</distributionManagement>
</project>
关于java - Ivy、Maven - 映射传递依赖,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12917778/