ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <>
Subject Re: Target dependency
Date Thu, 05 Jan 2006 05:08:58 GMT
On Wed, 4 Jan 2006, shreedhar natarajan <> wrote:

> 1. Can a target in one project depend on target on another project ?

In a way, yes.  You can import that other build file, or you cn use an
ant task as first task in your target that needs to depend on the
other build.

> 2. Is there any order in which the sub build is invoked when subant
> is called ?

Yes, you can use a <path> instead of a fileset, which is sorted.  The
drawback is that you can't use wildcards then.  Ant 1.7 will change
that since you will be able to sort filesets - plugging in your own
sorting algorithms if necessary.

For Ant 1.6 you could write your own task to create path of the
fileset sorting them in the order you need.

> For eg. if i invoke
>  <subant target="">
>       <fileset dir="." includes="*/build.xml"/>
>  </subant>
> And I have 3 sub directories A,B and C. Which build.xml will be
> invoked first ?

Depends on your OS and maybe even on your Java VM.  The build.xml that
is found first by Ant when it traverses the file system - so the
question is what is the first directory returned by, which doesn't have any globally correct answer.
Most likely it will be in alphabetical order.

> 3. Already I have raised this questions. Any clue ? Is there a way
> to execute all sub-builds with a single subant call.

I've already answered it:


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message