ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matt Benson <gudnabr...@yahoo.com>
Subject Re: Thinking in Ant...
Date Mon, 04 Oct 2004 20:16:36 GMT
As a matter of curiosity, whenever a nested
<redirector> element gets added to <concat>, a builtin
solution will exist to the given problem.  My personal
workaround would use ant-contrib's <for> and <var>
with <concat> and <pathconvert>...

-Matt

--- Stefan Bodewig <bodewig@apache.org> wrote:

> On Mon, 4 Oct 2004, Richard Russell
> <richard.russell@db.com> wrote:
> 
> > I run into these issues so regularly that I cannot
> help but assume
> > that I am simply not 'thinking in Ant', and am
> therefore fighting
> > against its design rather than working with it.
> 
> Sounds like it.
> 
> One of the major points seems to be that you want to
> drive the
> execution instead of having ant make the decisions. 
> You usually don't
> code loops in Ant but use a task that will
> implicitly perform the
> loop.
> 
> > for file in `ls ${dir1}/*.DAT`; do 
> >   cat ${dir1}/${file} | sed -e
> 's/@parameter@/value/' >>
> >   ${dir2}/${file}
> > done
> 
> translates into a single <copy> with a nested
> <replactokens> if it
> wasn't for the second ">".  There isn't any append
> mode in <copy>.  Is
> this a real world requirement?  Must be, otherwise
> you wouldn't have
> written a task for it.
> 
> If you can express it as a shell script, you can
> always use <exec> or
> <apply>, but then your platform independence has
> gone.
> 
> Ant really isn't the best fit if your process is
> extremely procedural,
> it usually isn't even though your experience says it
> is in you case.
> 
> The main mismatch I really see is that you want to
> express yourself in
> loops while Ant wants to work on collections.
> 
> Stefan
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> user-unsubscribe@ant.apache.org
> For additional commands, e-mail:
> user-help@ant.apache.org
> 
> 



		
_______________________________
Do you Yahoo!?
Declare Yourself - Register online to vote today!
http://vote.yahoo.com

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


Mime
View raw message