开发者

Ant calling child project parent project ivy.xml overriding child project ivy.xml

开发者 https://www.devze.com 2022-12-29 08:41 出处:网络
We\'ve got a pa开发者_开发问答rent project and a child project java builds using ant and ivy. The child project needs to be able to build independently.

We've got a pa开发者_开发问答rent project and a child project java builds using ant and ivy. The child project needs to be able to build independently.

When the parent project calls the child project the antfile command - the parent project's ivy.xml overrides the child project's ivy.xml

Does anyone know how to keep the child project using its own ivy.xml?


I'm guessing that ivy is picking up the ivy file from the default location, which would be in the same directory as the build file.

One approach would be to explicitly set the ivy file's location:

<ivy:resolve file="path/to/ivy.xml"/>

A better approach would be to figure out the base directory location for your child build. How are you invoking child project? Are you using the subant or the ant Ant task?

If it is the latter make sure to use the dir attribute:

<ant dir="subproject"/>

This will specify the base dir for the child project.

0

精彩评论

暂无评论...
验证码 换一张
取 消