ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <>
Subject Re: Thinking in Ant...
Date Mon, 04 Oct 2004 20:11:23 GMT
On Mon, 4 Oct 2004, Richard Russell <> 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

> 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.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message