Hi Mohan, I don't know if this will solve your immediate problem, but when I need dynamic behavior in a build I use an xslt stylesheet and an xml file to create my build script. I see ANT as just a processor and the build file as just data. So I try to generate the data for the build in advance and in this way get seemingly "dynamically." There are probably other less radical solutions to your issue, but I thought you might be interested in an approach that's worked really well for me.
All the best, Brian Brian McCallion President WebSphere Automation Solutions Bronze Drum Consulting, Inc. 230 Park Avenue New York, NY 10169 T (646) 283-0534 F (646) 201-9596 http://www.bronzedrum.com [EMAIL PROTECTED] -----Original Message----- From: Guttula, Mohan [mailto:[EMAIL PROTECTED] Sent: Thursday, April 06, 2006 9:37 AM To: user@ant.apache.org Subject: Dynamically increase the number of arguments to EXEC task based on the number and name of the file(s) in a directory. Hello All, Requirement: Dynamically increase the number of arguments to EXEC task based on the number and name of the file in a directory. For example a sample directory contains the following files with extension "*.rod" (Number of rod files in the "src" directory dynamically change): C:\src> dir /b *.rod Details.rod Info.rod Summary.rod Right now, I'm hard coding the file names in arguments to EXEC task in the following way <target name="erdpro"> <condition property="erdpro.client.dir" value="C:\Program Files\Actuate8\eRDPro\bin" > <os family="windows"/> </condition> <echo> Compiling ROD files. Please wait...</echo> <exec dir="${erdpro.client.dir}" executable="${erdpro.client.dir}/erdpro" > <arg value="-b"/> <arg value=" Details.rod" /> <arg value=" Info.rod" /> <arg value=" Summary.rod" /> </exec> </target> Above target is good when I hardcode the files to the "arg". I want to dynamically add "arg" values based on the number and name of the file. I want to know how I can achieve my requirement. (Should I use marcodef? If so how?) Any help is highly appreciated. Thanks, Mohan ************************************************************** This message, including any attachments, contains confidential information intended for a specific individual and purpose, and is protected by law. If you are not the intended recipient, please contact sender immediately by reply e-mail and destroy all copies. You are hereby notified that any disclosure, copying, or distribution of this message, or the taking of any action based on it, is strictly prohibited. TIAA-CREF **************************************************************
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]