Return-Path: Delivered-To: apmail-ant-user-archive@www.apache.org Received: (qmail 62300 invoked from network); 4 Oct 2004 20:16:51 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 4 Oct 2004 20:16:51 -0000 Received: (qmail 97805 invoked by uid 500); 4 Oct 2004 20:16:41 -0000 Delivered-To: apmail-ant-user-archive@ant.apache.org Received: (qmail 97589 invoked by uid 500); 4 Oct 2004 20:16:39 -0000 Mailing-List: contact user-help@ant.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Ant Users List" Reply-To: "Ant Users List" Delivered-To: mailing list user@ant.apache.org Received: (qmail 97576 invoked by uid 99); 4 Oct 2004 20:16:39 -0000 X-ASF-Spam-Status: No, hits=0.1 required=10.0 tests=DNS_FROM_RFC_ABUSE X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: local policy) Received: from [66.163.170.249] (HELO web20426.mail.yahoo.com) (66.163.170.249) by apache.org (qpsmtpd/0.28) with SMTP; Mon, 04 Oct 2004 13:16:37 -0700 Message-ID: <20041004201636.15210.qmail@web20426.mail.yahoo.com> Received: from [65.247.233.98] by web20426.mail.yahoo.com via HTTP; Mon, 04 Oct 2004 13:16:36 PDT Date: Mon, 4 Oct 2004 13:16:36 -0700 (PDT) From: Matt Benson Subject: Re: Thinking in Ant... To: Ant Users List In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N As a matter of curiosity, whenever a nested element gets added to , a builtin solution will exist to the given problem. My personal workaround would use ant-contrib's and with and ... -Matt --- Stefan Bodewig wrote: > 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 > loop. > > > for file in `ls ${dir1}/*.DAT`; do > > cat ${dir1}/${file} | sed -e > 's/@parameter@/value/' >> > > ${dir2}/${file} > > done > > translates into a single with a nested > if it > wasn't for the second ">". There isn't any append > mode in . 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 or > , 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