ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brett Ramdeen <>
Subject RE: Building a hirechial build system
Date Tue, 13 Feb 2001 16:52:36 GMT
>> Does this result in a new javac process each time? Additionally, does
>> this mean that one would need to define new targets for each 
>> directory
>> in the main build.xml file? 

No, the <ant> task does not fork a new VM which is good because if one of
your sub-projects fails, then the whole thing fails.  Yes you do need to
define targets in the main build.xml that make calls into the sub-projects.
However you don't need to make a separate target in the main build.xml for
each target in the sub-projects.

IE: If you have a sub-project with 2 tasks, you can have 1 target in the
main build.xml which makes the 2 calls.  Your target would just have 2 <ant>

>> Alternatively, is there a way of automating the search so that the
>> contents of the build.xml files in the sub directory be 
>> included in the
>> appropriate targets? For instance, if I want to exclude a particular
>> package from being included in compilation then I would 
>> probably want to
>> specify the <exclude> in the directory and would want this to be
>> included in my compile target.

I'm not sure that I follow you, but I'll take a stab:

When you specify a target with an <ant> task, the main build is essentially
invoking the target within the sub-project's build.xml.  As such the main
build.xml "knows" what your target in the sub-project "knows".  Ie: if the
sub-project has an <exclude>, the main build.xml knows about it since it is
calling the sub-project.

Hope that helps.


View raw message