我最近更新了我的项目结构以使用IVY:扩展了我声明父项(common-ivy.xml)并在所有项目中扩展的功能(我有大约120个使用此项目的项目)。我通过使用此线程IVY Extends via ivy:resolve中的技术来实现此目的。IVY扩展失去依赖声明
现在的问题是,在采用这种结构后,我失去了项目之间的依赖关系,这是必需的,它现在正在破坏一切。例如见下文;
共的ivy.xml
<?xml-stylesheet type="text/xsl" href="http://repository.temenosgroup.com/xsl/version-doc.xsl"?>
<ivy-module version="2.0" xmlns:e="http://ant.apache.org/ivy/extra">
<info organisation="xyz" branch="15" module="CommonDependency" revision="1.0.0" />
<configurations defaultconfmapping="test->test(*);compile->compile(*)">
<conf name="test" description="Test Time dependencies"/>
<conf name="compile" description="Compile Time dependencies"/>
</configurations>
<dependencies>
<dependency org="junit" name="junit" rev="4.8.2" conf="compile,test"/>
</dependencies>
</ivy-module>
ProjectZ的ivy.xml延伸常见,但没有定义任何依赖性附加
<?xml-stylesheet type="text/xsl" href="http://repository.temenosgroup.com/xsl/version-doc.xsl"?>
<ivy-module version="2.0" xmlns:e="http://ant.apache.org/ivy/extra">
<info module="ProjectZ" >
<extends extendType="all"
organisation="xyz"
module="CommonDependency"
revision="1.0.0"
location="../parent/common-ivy.xml" />
</info>
<dependencies />
</ivy-module>
项目A的ivy.xml共同延伸,以及如定义其对ProjectZ的依赖性
<?xml-stylesheet type="text/xsl" href="http://repository.temenosgroup.com/xsl/version-doc.xsl"?>
<ivy-module version="2.0" xmlns:e="http://ant.apache.org/ivy/extra">
<info module="ProjectA" >
<extends extendType="all"
organisation="xyz"
module="CommonDependency"
revision="1.0.0"
location="../parent/common-ivy.xml" />
</info>
<dependencies>
<dependency org="xyz" name="ProjectZ" branch="15" rev="latest-dev" conf="compile,test"/>
</dependencies>
</ivy-module>
当我通过这个列表到ivy:buildlist
其返回的顺序;
ProjectA, ProjectZ
这是不正确它应返回;
ProjectZ, ProjectA
我使用的是IVY 2.3.0。这是IVY中的错误还是我错过了一些东西?
你的扩展声明不应该包含branch =“15”来正确引用common-ivy.xml吗? – 2014-09-12 00:48:19
extends不支持'branch'属性,它将直接从common-ivy.xml中使用到每个项目中。问题出在ProjectA声明它依赖于ProjectZ的依赖项,但是IVY无法识别它 – SJunejo 2014-09-12 19:11:29