Return-Path: X-Original-To: apmail-ant-user-archive@www.apache.org Delivered-To: apmail-ant-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id DE9A779C8 for ; Fri, 5 Aug 2011 12:51:42 +0000 (UTC) Received: (qmail 84403 invoked by uid 500); 5 Aug 2011 12:51:41 -0000 Delivered-To: apmail-ant-user-archive@ant.apache.org Received: (qmail 84301 invoked by uid 500); 5 Aug 2011 12:51:41 -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 84172 invoked by uid 99); 5 Aug 2011 12:51:41 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 05 Aug 2011 12:51:41 +0000 X-ASF-Spam-Status: No, hits=0.6 required=5.0 tests=FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS,URI_HEX X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of parag.doke@gmail.com designates 209.85.161.45 as permitted sender) Received: from [209.85.161.45] (HELO mail-fx0-f45.google.com) (209.85.161.45) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 05 Aug 2011 12:51:33 +0000 Received: by fxbb27 with SMTP id b27so1347269fxb.4 for ; Fri, 05 Aug 2011 05:51:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=r+tTKQNfbF9m/6Tu3feSK11n0PpSn4L1iDcZQRWpiVQ=; b=Y7Epb0CJAb8JOB4wzEXNWaGtTVojWNg0lyfkCNRtRTYWBwGlBeBNv53d/HeWq3H0gZ u1ypUQM0pT2/7U6w+u07w7P59+++jnB7E/Ur5jjA2P/aQW21e9qIXP/8RUurkIo5+hcH brKdKA5zjhQ6vAdHzMQzrLBLWfhPzCJmGfL9I= MIME-Version: 1.0 Received: by 10.204.30.204 with SMTP id v12mr696239bkc.340.1312548673312; Fri, 05 Aug 2011 05:51:13 -0700 (PDT) Received: by 10.205.83.75 with HTTP; Fri, 5 Aug 2011 05:51:13 -0700 (PDT) In-Reply-To: <1312534947055-4669046.post@n5.nabble.com> References: <1312534947055-4669046.post@n5.nabble.com> Date: Fri, 5 Aug 2011 18:21:13 +0530 Message-ID: Subject: Re: Mail task on Target failure From: Parag Doke To: Ant Users List Content-Type: text/plain; charset=ISO-8859-1 X-Virus-Checked: Checked by ClamAV on apache.org There is the try/catch task in antcontrib (http://ant-contrib.sourceforge.net/tasks/tasks/index.html) that allows you to catch exceptions in tasks. I haven't tried this anytime ... but maybe you could try calling a target within such a block. Thanks, Parag Doke Save paper, save trees. Do not print emails/documents unless absolutely necessary. On Fri, Aug 5, 2011 at 2:32 PM, vino_hymi wrote: > Hi, > > I have ant project where there is set of targets. After successful > completion of all targets I call mail target at the end to send a mail with > attached logs with message build successful. > > Now, my challenge is if one of the target fails then build exits so it will > not proceed to mail target which is the last one to perform on completion of > all. How can I use mail target to send mail on any target failure? > > Any hints? > > -Vinodh Kumar > > -- > View this message in context: http://ant.1045680.n5.nabble.com/Mail-task-on-Target-failure-tp4669046p4669046.html > Sent from the Ant - Users mailing list archive at Nabble.com. > > --------------------------------------------------------------------- > To unsubscribe, e-mail: user-unsubscribe@ant.apache.org > For additional commands, e-mail: user-help@ant.apache.org > > --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@ant.apache.org For additional commands, e-mail: user-help@ant.apache.org