Return-Path: Delivered-To: apmail-ant-dev-archive@www.apache.org Received: (qmail 66185 invoked from network); 18 May 2007 08:39:47 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 18 May 2007 08:39:47 -0000 Received: (qmail 81193 invoked by uid 500); 18 May 2007 08:39:52 -0000 Delivered-To: apmail-ant-dev-archive@ant.apache.org Received: (qmail 81156 invoked by uid 500); 18 May 2007 08:39:52 -0000 Mailing-List: contact dev-help@ant.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Ant Developers List" Reply-To: "Ant Developers List" Delivered-To: mailing list dev@ant.apache.org Received: (qmail 81145 invoked by uid 99); 18 May 2007 08:39:52 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 18 May 2007 01:39:52 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: domain of foamdino@gmail.com designates 66.249.92.172 as permitted sender) Received: from [66.249.92.172] (HELO ug-out-1314.google.com) (66.249.92.172) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 18 May 2007 01:39:45 -0700 Received: by ug-out-1314.google.com with SMTP id m3so430072ugc for ; Fri, 18 May 2007 01:39:24 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=bcuDX18SyZyAVxBLwXIEfoc30Hjq6sY7J+Njbs3LLm3sloKwpiSZ7zQ48h56J+ZGqkJVptrGaS+U1ciSJANHPYGsF+rl8ByPtl8ZHRB3UCUGgPVFToYveKpXYvdjtGoeaR3qyrsFYKeqcjDI+8527td+OzfK0PhhB1w3ZIJ27a8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=QmrH18aApN7Jsu21sVq2D6ips2nK9QbrhrN8YbHUXe1SAcVqxgO4+uKrf7VIx2ihQqBJlfa8Vk3jkq+XwRjnBTzSF2rfKfFHF3QOKqxy9tr5eJuBbGS0PjEatJ0JdFlX0d/EMzX+get9a3gmI1LMxOTgCM57SISoBG+uiJz8AUI= Received: by 10.82.163.13 with SMTP id l13mr2314800bue.1179477564098; Fri, 18 May 2007 01:39:24 -0700 (PDT) Received: by 10.82.151.12 with HTTP; Fri, 18 May 2007 01:39:24 -0700 (PDT) Message-ID: Date: Fri, 18 May 2007 15:39:24 +0700 From: "Kevin Jackson" To: "Ant Developers List" Subject: Re: Retry task available in svn head In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: X-Virus-Checked: Checked by ClamAV on apache.org Hi Jan, > If the nested task does not fail, the loop must be finished. > > + public void execute() throws BuildException { > + for(int i=0; i<=retryCount; i++) { > + try { > + nestedTask.perform(); yes there should be a break; here - I will update as soon as eclipse has stopped doing some updating > + } catch (Exception e) { > + if (i + log("Attempt ["+i+"] error occured, retrying...", e, Project.MSG_INFO); > + } else { > + throw new BuildException("Task ["+nestedTask.getTaskName()+"] failed after ["+retryCount+"] attempts, giving up"); > + } > + } > + } > + } Thanks for the catch, just shows that I don't have very good unit tests, have to add that one. Kev --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org For additional commands, e-mail: dev-help@ant.apache.org