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 117797B83 for ; Thu, 3 Nov 2011 16:02:49 +0000 (UTC) Received: (qmail 95216 invoked by uid 500); 3 Nov 2011 16:02:48 -0000 Delivered-To: apmail-ant-user-archive@ant.apache.org Received: (qmail 95184 invoked by uid 500); 3 Nov 2011 16:02:48 -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 95175 invoked by uid 99); 3 Nov 2011 16:02:48 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 03 Nov 2011 16:02:48 +0000 X-ASF-Spam-Status: No, hits=2.2 required=5.0 tests=FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [98.139.213.138] (HELO nm18-vm0.bullet.mail.bf1.yahoo.com) (98.139.213.138) by apache.org (qpsmtpd/0.29) with SMTP; Thu, 03 Nov 2011 16:02:38 +0000 Received: from [98.139.212.148] by nm18.bullet.mail.bf1.yahoo.com with NNFMP; 03 Nov 2011 16:02:17 -0000 Received: from [98.139.212.206] by tm5.bullet.mail.bf1.yahoo.com with NNFMP; 03 Nov 2011 16:02:17 -0000 Received: from [127.0.0.1] by omp1015.mail.bf1.yahoo.com with NNFMP; 03 Nov 2011 16:02:17 -0000 X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 483459.39576.bm@omp1015.mail.bf1.yahoo.com Received: (qmail 37411 invoked by uid 60001); 3 Nov 2011 16:02:17 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1320336137; bh=lCYvcBFLFTbocMRnaKDefT4yXhvgT/F36teUMZGD1Qk=; h=X-YMail-OSG:Received:X-Mailer:References:Message-ID:Date:From:Reply-To:Subject:To:In-Reply-To:MIME-Version:Content-Type; b=njxPHTaErLHVPq4fydJgfTsybLfLdq2KBV8b3YKpwQISYBeD45fDxjrjKLSQIz1OI5q6z75v09SD7VHi0r148f23Df18UyCI+K0p3cN2V2kUNTAl0oi3Wp5avkzAxVonN4lchvZA64np+ZKa0BLcapSzCjVfuGMk6qh+ypUNfI8= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=X-YMail-OSG:Received:X-Mailer:References:Message-ID:Date:From:Reply-To:Subject:To:In-Reply-To:MIME-Version:Content-Type; b=50YQKqO9D1UMNnWyDkr68Vmam0iyfXYFmjMQchNd5xma4Qa2VZs8t9mLP8abZhgUy2vR22MHxim8hEJMemX2mwUh89JSoKjPmD8tsOozKNKXPiHioyZf5sjKDSCnUDSDIPAgMKmxwB8XgqvshZ7ftVmw4pN+uGrwvFq2dpR8axY=; X-YMail-OSG: z8kQTlMVM1mwXVFc3wNz_egAZwkZrFQJiysTWOKQ_fSwXci nDRmzDYBINy93bNui2nJccjtkeKdYmGX.rTI4VYHONHrH45KNKjIgcwCOTJ1 3QoBhpg65kuQ9k37qD39n17Y9mT2Y4da4k.2cw7pk9VQUdlFbl8apnJ4zH5X OU6akXWm81vqBHsdegAInIM0e2xbUrCQeHKRit9UdupCKvFo79BdTUaHCwmC cmX5EYs4Bdk4cCfAqwyZLkYPvkO.9hamZTGDrRYTQrtv9PLSdnUXRjnh9KJy i6aK6atKvgHruiXhpB5NK7GI6_tM7b6BLpEO.9jGgcroc5ERwmpfHur8h_Et Z4VwVR7selhoy9ibVQo0IksTb32h8ovj1dWKQN6b_2xXrcNnFWz7vdRgbuVC AvL1HlcBR0CgnY.QifZCvqZ_FQFWh9bx3RTtsitt8PP.2LgKxCmimWKTlcOY JCneQSw-- Received: from [64.184.229.51] by web161201.mail.bf1.yahoo.com via HTTP; Thu, 03 Nov 2011 09:02:17 PDT X-Mailer: YahooMailWebService/0.8.115.325013 References: <4EB28090.5090903@sas.com> <1320328526.4990.YahooMailNeo@web161205.mail.bf1.yahoo.com> <4EB2A4C7.9000805@sas.com> Message-ID: <1320336137.23599.YahooMailNeo@web161201.mail.bf1.yahoo.com> Date: Thu, 3 Nov 2011 09:02:17 -0700 (PDT) From: Vimil Saju Reply-To: Vimil Saju Subject: Re: Checking if a Target Exists To: Steve Amerige , Ant Users List In-Reply-To: <4EB2A4C7.9000805@sas.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="1261493821-132708298-1320336137=:23599" X-Virus-Checked: Checked by ClamAV on apache.org --1261493821-132708298-1320336137=:23599 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Here is an example, I havent tested it though=0A=0A=0A=A0 =A0 =A0 =A0 =A0=0A=A0 =A0 =A0 =A0 =A0=0A=A0 =A0 = =A0 =A0 =A0=0A=0A=0Athe scriptd= ef can be then invoked as folows=0A=0A=0A=0Athe property 'targetExists' will be set to t= rue if the target 'mytarget' is present in the project. Otherwise it will n= ot be set.=0A=0A=0A________________________________=0AFrom: Steve Amerige <= Steve.Amerige@sas.com>=0ATo: Ant Users List ; Vimil Sa= ju =0ASent: Thursday, November 3, 2011 7:27 AM=0ASubje= ct: Re: Checking if a Target Exists=0A=0A=0AHi Vimil,=0A=0AThanks for the f= eedback.=A0 Any specifics on just how to do what you=0A mention (even if= untested)?=0A=0AThanks again,=0ASteve Amerige=0ASAS Institute, Deployment = Software Development=0A=0AOn 11/3/2011 9:55 AM, Vimil Saju wrote: =0AI thin= k you can use the scriptdef task to do this. You can write a script=A0withi= n=A0the scriptdef object to access the methods of the project object. The p= roject object has methods to list the targets defined under the project, wh= ich you can use to test if a given target exists.=0ABtw antcall does not la= unch a new jvm, it only reloads the build.xml. ____________________________= ____=0AFrom: Steve Amerige To: Ant Users List Sent: Thursday, November 3, 2011 4:52 AM=0ASubject: Checki= ng if a Target Exists Hi all, I want to be able to check if a target exists= and hope you can help.=A0 I'm looking for a generic solution that doesn't = rely any knowledge of the target name to be checked.=A0 It is not possible = to modify the target code.=A0 And, I'd like to avoid any solutions that cau= se the entire JVM to be loaded (e.g., as with antcall). My environment is A= nt 1.7 and allows for the use of Ant-Contrib and Groovy. Any ideas on how t= o do this?=A0 Even better, any solutions anyone have to share?! Thanks,=0AS= teve Amerige=0ASAS Institute, Deployment Software Development --1261493821-132708298-1320336137=:23599--