ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alexey N. Solofnenko" <A.Solofne...@mdl.com>
Subject Re: can ant solve this rather complex challenge
Date Tue, 23 Aug 2005 16:41:26 GMT
There are also <scriptdef> 
(http://ant.apache.org/manual/OptionalTasks/scriptdef.html) and 
<foreach> (http://ant-contrib.sourceforge.net/tasks/tasks/foreach.html).

- Alexey.

Scott Bell wrote:
>
>
> Problem statement:
>
> I have a number of simple tcl scripts, and they take a set number of 
> params as input (argv). Usually 1-10 params.  They can all run 
> standalone, but have dependencies. ANT is therefore perfect for them.
>
> I have the params that I send to the scripts as named value pairs in a 
> set of property files. We clone the property files for each objects we 
> want created.
>
> For example
>
> hostobject1.properties
> hostobject2.properties
>
> we would send to hostobject.tcl twice to create two objects.
>
> Ok, so far...but, its not a good way to run a deployment, run a script 
> twice manually.
>
> But it gets more complicated. There are about 10 difference scripts 
> and with each script, we  often need to create many objects, each with 
> its own properties.
>
> So here is the solution (question is, can ANT make it possible):
>
> We want to run each one of the scripts,  once for every property file 
> that EXISTS, and we want to use ant to drive the whole thing.
>
> So, if there is a hostobject5..properties file..in a directory, ant 
> knows it needs to run the script for it to create the object.
>
> So ant goes and
> 1. finds the properties files
> 2. understands from the name of the property file what task to execute 
> and pass it to
> 3. iterates over all files, calls the correct task once for each 
> property file it has
>
> Even better, we can put cloned property files into directories to keep 
> everything neat and tidy.
>
> How do we do this?  Can ANT make it work? or do I need a shell script.
>
> There are filesets, macrodefs..etc.
>
> We use 1.5 of ant, but..can upgrade to 1.6, if required. 1.5 solution 
> preferred.
>
> _________________________________________________________________
> It's fast, it's easy and it's free. Get MSN Messenger 7.0 today! 
> http://messenger.msn.co.uk
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org

-- 
------------------------------------------------------------------------
/ Alexey N. Solofnenko
MDL Information Systems, Inc.
work: 510-357-2222x1726
home: http://trelony.cjb.net/
/

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message