Return-Path: Delivered-To: apmail-ant-user-archive@www.apache.org Received: (qmail 74782 invoked from network); 22 Mar 2004 21:14:25 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 22 Mar 2004 21:14:25 -0000 Received: (qmail 34328 invoked by uid 500); 22 Mar 2004 21:14:06 -0000 Delivered-To: apmail-ant-user-archive@ant.apache.org Received: (qmail 34101 invoked by uid 500); 22 Mar 2004 21:14:04 -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 34087 invoked from network); 22 Mar 2004 21:14:04 -0000 Received: from unknown (HELO ussjmh01.bea.com) (63.96.162.5) by daedalus.apache.org with SMTP; 22 Mar 2004 21:14:04 -0000 Received: from ussjex04.amer.bea.com (ussjex04b.bea.com [172.16.120.57]) by ussjmh01.bea.com (Switch-3.0.5/Switch-3.0.0) with ESMTP id i2MLEBXu020130 for ; Mon, 22 Mar 2004 13:14:11 -0800 Received: from USKIEX01.amer.bea.com ([10.32.32.15]) by ussjex04.amer.bea.com with Microsoft SMTPSVC(5.0.2195.6713); Mon, 22 Mar 2004 13:14:10 -0800 X-MimeOLE: Produced By Microsoft Exchange V6.0.6487.1 content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Subject: RE: Using Ant to test whether a web app is installed on Tomcat Date: Mon, 22 Mar 2004 13:14:09 -0800 Message-ID: <4B2B4C417991364996F035E1EE39E2E1D8E5A5@uskiex01.amer.bea.com> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: Using Ant to test whether a web app is installed on Tomcat Thread-Index: AcQQRZH/oHUOAR3DRNeHFiSfQJ4ECQADIBgg From: "Simon Toens" To: "Ant Users List" X-OriginalArrivalTime: 22 Mar 2004 21:14:10.0370 (UTC) FILETIME=[9E607220:01C41052] X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Hi Michael, To check the property's value, you could do something like: (assuming resultprop has been set by the exec task) Simon -----Original Message----- From: Michael Woinoski [mailto:michaelw@pineneedleconsulting.com] Sent: Monday, March 22, 2004 11:43 AM To: user@ant.apache.org Subject: Using Ant to test whether a web app is installed on Tomcat I'm using Ant 1.5 to develop and test web apps with Tomcat 5. I need a = way to=20 use an Ant task to determine whether a particular web app is installed. Currently, my init task uses to check the existence of a = marker=20 file. Then the build task tests the property set by . If the = marker=20 file doesn't exist, the build task creates the marker file and installs = the app.=20 If the marker file exists, the build task reloads the app. However, this simple scheme frequently fails because there are times = when the=20 marker file exists but the application failed to install. I need a way = to make=20 the test for a successful installation more reliable. I thought about doing away with the marker file and instead using a Perl = script=20 that runs "ant list", searchs for the app context name in Ant's output, = and sets=20 a return code. But how do I test the return code in build.xml? The exec = task=20 supports a resultproperty attribute but I don't see a way to test the = property's=20 value. Note: I need to use Ant 1.5 bundled with JWSDP, so Ant 1.6 features = won't help. Thanks, Mike --=20 Mike Woinoski Pine Needle Consulting mailto:michaelw@pineneedleconsulting.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