ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Lundquist <>
Subject Re: How to?: add target dependencies
Date Fri, 11 Feb 2005 18:14:11 GMT

On Feb 10, 2005, at 12:01 PM, Dominique Devienne wrote:

>> (b) create a task for each module (e.g., "modules:killer-app") that
>> calls <ant> in the module subdirectory and also does some other stuff;
> You mean create a target, right!?

yes, which I was thinking is "create a task" in the same sense that 
<macrodef> is said to "define a new task" (there, by template 
substitution) on the macrodef page in the Ant manual.  Though maybe the 
Ant manual is guilty of a misnomer there, I don't know...

>> (c) make it so that the task "module" invokes all the module targets.
> Again, that would be the "module" target, no!?

Yes — unequivocally, a "target" there :-)

>> I think I can handle all the ant machinery for (a) and (b); it's just
>> (c) that has me flummoxed.
>> This kind of thing is a way of life in 'make'... there, you don't even
>> think about it.  You can say:
>> 	modules:; module.killer-app
>> 	modules:; module.legacy-crap
> Like you say, this isn't an easy one to answer, but let me try to 
> answer random questions, and see if any of it is useful...
> I 'think' you could replace your (b) and (c) by <subant>.

I thought that too at first :-)

> Sounds like (a) creates a new build file by module, in the main build, 
> and with (b) and (c) you want a way to build one or all modules from 
> the main build. Am I close?

Yes, very close....

> If (a) creates stand-alone build file, you can build a single module 
> by just using build -f modules/moduleA/build.xml

They aren't really standalone... they do depend on some properties from 
the top-level build...

> ... and in the main build, you can call <subant><fileset dir="modules" 
> includes="*/build.xml" /></subant>.

There's some per-module stuff that happens at the top-level (see the 
antage I posted in my reply to Matt B.)... I suppose I could pull that 
down into the module buildfiles, but since they can't run standalone 
anyway it doesn't help me much anyway.

> I think the make analogy was useful ;-) --DD


Thanks a lot for the thoughts!

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

View raw message