You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Scott Bell <li...@hotmail.com> on 2005/08/23 18:28:09 UTC
can ant solve this rather complex challenge
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
Re: can ant solve this rather complex challenge
Posted by Mark Lybarger <ml...@gmail.com>.
ant script task with javascript is what i'd go for..
On 8/23/05, Barry White <bw...@fotango.com> wrote:
>
> Have you looked at writing cutom ant tasks? It maye help to handle some
> of the messier details.
>
> Barry
>
> 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
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
>
>
Re: can ant solve this rather complex challenge
Posted by Barry White <bw...@fotango.com>.
Have you looked at writing cutom ant tasks? It maye help to handle some
of the messier details.
Barry
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
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org
Re: can ant solve this rather complex challenge
Posted by EJ Ciramella <ec...@archivas.com>.
Could Apply/ExecOn be your solution?
On Aug 23, 2005, at 12:28 PM, 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
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org
Re: can ant solve this rather complex challenge
Posted by "Alexey N. Solofnenko" <A....@mdl.com>.
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
Re: can ant solve this rather complex challenge
Posted by MCG QA <mc...@yahoo.com>.
I did a similar thing with ANT, Let me know if you
need it.
--- Scott Bell <li...@hotmail.com> wrote:
>
> No, but i wrote a shell script to do it.
>
> i'll post it here when done.
>
> >From: MCG QA <mc...@yahoo.com>
> >Reply-To: "Ant Users List" <us...@ant.apache.org>
> >To: Ant Users List <us...@ant.apache.org>
> >Subject: Re: can ant solve this rather complex
> challenge
> >Date: Wed, 31 Aug 2005 13:15:57 -0700 (PDT)
> >
> >Did you get a response to your problem??
> >
> >
> >--- Scott Bell <li...@hotmail.com> 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
> > >
> > >
> >
> >
> >__________________________________________________
> >Do You Yahoo!?
> >Tired of spam? Yahoo! Mail has the best spam
> protection around
> >http://mail.yahoo.com
> >
>
>---------------------------------------------------------------------
> >To unsubscribe, e-mail:
> user-unsubscribe@ant.apache.org
> >For additional commands, e-mail:
> user-help@ant.apache.org
> >
>
>
_________________________________________________________________
> Want to block unwanted pop-ups? Download the free
> MSN Toolbar now!
> http://toolbar.msn.co.uk/
>
>
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> user-unsubscribe@ant.apache.org
> For additional commands, e-mail:
> user-help@ant.apache.org
>
>
____________________________________________________
Start your day with Yahoo! - make it your home page
http://www.yahoo.com/r/hs
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org
Re: can ant solve this rather complex challenge
Posted by Scott Bell <li...@hotmail.com>.
No, but i wrote a shell script to do it.
i'll post it here when done.
>From: MCG QA <mc...@yahoo.com>
>Reply-To: "Ant Users List" <us...@ant.apache.org>
>To: Ant Users List <us...@ant.apache.org>
>Subject: Re: can ant solve this rather complex challenge
>Date: Wed, 31 Aug 2005 13:15:57 -0700 (PDT)
>
>Did you get a response to your problem??
>
>
>--- Scott Bell <li...@hotmail.com> 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
> >
> >
>
>
>__________________________________________________
>Do You Yahoo!?
>Tired of spam? Yahoo! Mail has the best spam protection around
>http://mail.yahoo.com
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
>For additional commands, e-mail: user-help@ant.apache.org
>
_________________________________________________________________
Want to block unwanted pop-ups? Download the free MSN Toolbar now!
http://toolbar.msn.co.uk/
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org
Re: can ant solve this rather complex challenge
Posted by MCG QA <mc...@yahoo.com>.
Did you get a response to your problem??
--- Scott Bell <li...@hotmail.com> 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
>
>
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org