ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Heikki Qvist <heikki.qv...@elisanet.fi>
Subject Re: Dynamically increase the number of arguments to EXEC task based on the number and name of the file(s) in a directory.
Date Thu, 06 Apr 2006 19:00:15 GMT
Hi,

I have similar issue. A lot of list files which are used to generate 
real filenames.

How to do extending these (eg. src,doc,bin,testsuite) to 
Linux_BUILDNUMBER_src.zip etc without hardcoding lits items? Their 
amount may differ in different branches also naming convention how final 
published names put together may change every now and then. Really want 
to normalize my configuration.

So what I am looking for is some xargs-like behaviour.


Guttula, Mohan kirjoitti:
> 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: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message