我有2个项目,但Apache Ivy无法检测到从一个到另一个的依赖(我做错了,但我无法看到它是什么)
2个项目位于单独的顶级目录中,如下所示
chainedresolvers项目
DEP-项目
project1常春藤
<ivy-module version="1.0">
<info organisation="myreports" module="chained-resolvers" status="integration"/>
<publications>
<artifact name="myapp" type="jar" conf="default" />
</publications>
<dependencies>
<dependency org="commons-lang" name="commons-lang" rev="2.0" conf="default"/>
<dependency name="test" rev="1.0"/>
<dependency name="rwrun" rev="latest"/>
</dependencies> </ivy-module>
project2 ivy(dep on project1)
<ivy-module version="1.0">
<info organisation="myreports" module="dep-project" status="integration"/>
<dependencies>
<dependency name="chained-resolvers" rev="latest.integration" conf="default"/>
</dependencies>
</ivy-module>
当我在第二个项目上运行ant时
::::::::::::::::::::::::::::::::::::::::::::::
:: UNRESOLVED DEPENDENCIES ::
::::::::::::::::::::::::::::::::::::::::::::::
:: myreports#chained-resolvers;latest.integration: not found
::::::::::::::::::::::::::::::::::::::::::::::
请评论我可能做错了什么,它无法获取依赖?
答案 0 :(得分:2)
由于
<publications>
<artifact name="myapp" type="jar" conf="default" />
</publications>
你的工件的名称是myapp 因此依赖必须是:
<ivy-module version="1.0">
<info organisation="myreports" module="dep-project" status="integration"/>
<dependencies>
<dependency organisation="myreports" name="myapp" rev="latest.integration" conf="default"/>
</dependencies>
</ivy-module>