ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Atul V. Setlur" <aset...@nvisia.com>
Subject Re: Building a hirechial build system
Date Tue, 13 Feb 2001 18:00:53 GMT

> >> 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.
> 
We are trying to provide each developer on a project the flexibility to
override the compile target defined in the master build.xml when
appropriate. 

For instance, when a developer wants to exclude the compilation of
source beneath a certain package. Our present configuration with a
master build.xml, would necessiate the addition of an  <exclude> to
exclude the package from the compile target defined in this file. The
rule defined in our compile target includes all Java source files by
default. The main build.xml file could potentially needed to be modified
by many developers and will be the point of contention. Also in certain
instances, the global "<exclude>" may not be valid for all on the
project. Another reason why we don't want people modifying the main
buildfile. 

Going back to my question, I was wondering if the list of <include> and
<exclude> could be built dynamically by searching in all the sub
directories of a project and including these rules when they exist in
the xml files that exist in the subdirectory. I Hope that I made sense.

Your suggestion to define tasks would mean that a task would need to be
defined for every sub directory. Needing build.xml files for every
directory. And that the compile target in these buildfiles would specify
the rules to include the relevant source files.

Thanks,
-Atul

Mime
View raw message