Return-Path: Delivered-To: apmail-ant-user-archive@www.apache.org Received: (qmail 57118 invoked from network); 19 Aug 2008 13:49:25 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 19 Aug 2008 13:49:25 -0000 Received: (qmail 46035 invoked by uid 500); 19 Aug 2008 13:49:20 -0000 Delivered-To: apmail-ant-user-archive@ant.apache.org Received: (qmail 46000 invoked by uid 500); 19 Aug 2008 13:49:20 -0000 Mailing-List: contact user-help@ant.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Ant Users List" Reply-To: "Ant Users List" Delivered-To: mailing list user@ant.apache.org Received: (qmail 45989 invoked by uid 99); 19 Aug 2008 13:49:20 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 19 Aug 2008 06:49:20 -0700 X-ASF-Spam-Status: No, hits=1.2 required=10.0 tests=SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [75.180.132.122] (HELO cdptpa-omtalb.mail.rr.com) (75.180.132.122) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 19 Aug 2008 13:48:23 +0000 Received: from flossware.homelinux.org ([66.57.231.67]) by cdptpa-omta01.mail.rr.com with ESMTP id <20080819134751.MTVB3981.cdptpa-omta01.mail.rr.com@flossware.homelinux.org> for ; Tue, 19 Aug 2008 13:47:51 +0000 Received: from adminserver.flossware.com (adminserver.flossware.com [192.168.168.2]) by flossware.homelinux.org (Postfix) with ESMTP id 89919382098 for ; Tue, 19 Aug 2008 09:48:55 -0400 (EDT) Date: Tue, 19 Aug 2008 09:48:55 -0400 (EDT) From: "Scot P. Floess" X-X-Sender: sfloess@adminserver.flossware.com To: Ant Users List Subject: Re: variables or a counter ? In-Reply-To: Message-ID: References: User-Agent: Alpine 1.10 (LRH 962 2008-03-14) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Virus-Checked: Checked by ClamAV on apache.org Just a note, be careful about recursively calling a macro... You will eventually get a stack overflow. I did something like this with a simulated for-loop using Ant Contrib's Math task. I found after around 300 - 400 iterations I'd get a stack overflow... On Tue, 19 Aug 2008, Ivar Bratberg wrote: > Hi, > I have the following problem I try to solve in ant. > I should check a www server for a certain result each minute. > I should keep on checking until a desired result is given ( the file > downloaded should exceed a certain limit ) > In addition it should have a kind of timeout so it it will return if it > has tried too many times. > > > I I have made a ant macro which calls itself recursively since there is > no task > I have also access to a task so I manage to check if I have got the > wanted result > > > But as mentioned I would like to have a timeout, by counting up a > parameter which is given to the recursive macro. > Is this possible ? > I have not seen any or task. > > Do some of you have better suggestions for solving this ? > Note, I cannot use task, because I have to check not only for > error code on the response, but the text itself( I manage whith checking > the length of the file downloaded > > > To summarize my questions: > > - Can I add to variables/properties and but the result in a third > property ? > - Is there a better way than recursive macro to achieve the effect of > looping ? > > Ivar > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: user-unsubscribe@ant.apache.org > For additional commands, e-mail: user-help@ant.apache.org > > Scot P. Floess 27 Lake Royale Louisburg, NC 27549 252-478-8087 (Home) 919-754-4592 (Work) Chief Architect JPlate http://sourceforge.net/projects/jplate Chief Architect JavaPIM http://sourceforge.net/projects/javapim Architect Keros http://sourceforge.net/projects/keros --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@ant.apache.org For additional commands, e-mail: user-help@ant.apache.org