ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mark D. Anderson" <>
Subject Re: some new ant user questions
Date Thu, 13 Dec 2001 18:14:22 GMT
> > - is there a simple recipe to get ant to only build in my current
> > directory or below
> as opossed to what? ant, by default, will look for a build.xml file in the
> current directory (or the supplied buildfile through the -buildfile command
> line option). It will then do execute whatever is specifed in the build
> file.

i'd rather just have one build.xml file at the top of my src tree, and use the ant
feature to walk up the tree looking for it.
then wherever i am in the tree i'd like a command that just builds the current
subtree, even though it would be default walk to the top, then interpret "."
as meaning the top, not cwd. so my desiderata are:
- one build.xml at the top
- a shell command to just build in the cwd
- a shell command to build the whole tree

> > - is there a simple recipe to use a different classpath depending
> > on what machine on
> > or on what OS i'm on?
> For path and classpath stuctures, check the manual in the sectiom Using Ant
> > Path-like structures. The section should answer most of your questions
> regarding claspaths.

that describes some syntax, but has no recipes, and no discussion of getting a conditional
although i don't think i want to use "<condition>".
i think what i want can be achieved by including an external xml file named after the
current machine name (or named after a command line -D which i might supply).
however, using XML entities for inclusion happens prior to any ant-level processing.
i don't see any other higher-level include operation for ant ("<include>" is
for filesets, not external build.xml files). perhaps subprojects could be used,
but i don't think that has the desired effect (does not effect the parent project).

so i guess i'm left with just commenting out portions of the build.xml file according
to the desired configuration.


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

View raw message