Looks like your main question is how to accumulate, then iterate, over these modules. It looks as though ant-contrib has some helpful tasks. You could set a new property for each of your modules: module.foo=foo or whatever. Then it appears you could use ant-contrib's propertyselector task with a select attribute value of "$${\0}" (you might have to experiment). This should get you a single property containing the property-expansion notation of all matching properties. You can then use this list as input to ant-contrib's for task, calling your macro for each module name.
Maybe food for thought, anyway... HTH, Matt --- Mark Lundquist <[EMAIL PROTECTED]> wrote: > Hi, > > I've been using ant for some time, but I'm no > expert. I just joined > this list. And here's my question! :-) > > Actually, I can't even think how to phrase this > question in any more > general terms :-)... so I'll just describe > specifically what I'm trying > to accomplish (part of it will only make sense if > you understand > Subversion, but oh well). > > I've got several "modules" that I need to be able to > build into various > projects. So what I think I'd like to be able to do > is use <macrodef> > and then be able to just call out the modules like > so: > > <module name="killer-app" /> > <module name="job-security" /> > <module name="legacy-crap" /> > <!-- etc... --> > > The idea is that this would > > (a) build up a file that I can use to invoke "svn > propset svn:externals > -f", then "svn update" the external 'mount-point' if > it doesn't exist > — i.e., "fetch" the module sources into the local > project; > > (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; > > (c) make it so that the task "module" invokes all > the module targets. > > 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 > > to successively add dependencies to a target. So > you can do the same > thing in a macro ("modules:; this_module" or > whatever). Or, you can > say > > MODULES += this_module > > or > > MODULES = $(MODULES) this_module > > (depending on the variant of make), and then later: > > modules: $(MODULES) > > So there are a couple of ways in make, but I haven't > seen that it's > possible to add a dependency to an existing target. > And Ant properties > are immutable, so I can't go that way... > > BTW this isn't meant as an ant vs. make thing, I > just mention it in the > hopes that maybe somebody else with a 'make' > background will recognize > what the crap I'm talking about :-) :-). > > Any suggestions? > —mark— > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: > [EMAIL PROTECTED] > For additional commands, e-mail: > [EMAIL PROTECTED] > > __________________________________ Do you Yahoo!? The all-new My Yahoo! - What will yours do? http://my.yahoo.com --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]