Return-Path: Delivered-To: apmail-ant-dev-archive@www.apache.org Received: (qmail 92236 invoked from network); 15 Aug 2004 21:17:21 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 15 Aug 2004 21:17:21 -0000 Received: (qmail 10141 invoked by uid 500); 15 Aug 2004 21:17:18 -0000 Delivered-To: apmail-ant-dev-archive@ant.apache.org Received: (qmail 10091 invoked by uid 500); 15 Aug 2004 21:17:17 -0000 Mailing-List: contact dev-help@ant.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Ant Developers List" Reply-To: "Ant Developers List" Delivered-To: mailing list dev@ant.apache.org Received: (qmail 10078 invoked by uid 99); 15 Aug 2004 21:17:17 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received: from [134.132.72.99] (HELO junior.lgc.com) (134.132.72.99) by apache.org (qpsmtpd/0.27.1) with ESMTP; Sun, 15 Aug 2004 14:17:14 -0700 Received: from lgchvw02.lgc.com (lgchvw02.lgc.com [134.132.93.108]) by junior.lgc.com (8.11.7/8.11.3) with SMTP id i7FLHA808086 for ; Sun, 15 Aug 2004 16:17:10 -0500 (CDT) Received: from 134.132.72.99 by lgchvw02.lgc.com (InterScan E-Mail VirusWall NT); Sun, 15 Aug 2004 16:17:07 -0500 Received: from HOUEXCH903.landmark.lgc.com (houexch903.landmark.lgc.com [134.132.167.43]) by junior.lgc.com (8.11.7/8.11.3) with ESMTP id i7FLH4j08080 for ; Sun, 15 Aug 2004 16:17:04 -0500 (CDT) Received: from HOUEXCH902.landmark.lgc.com ([134.132.167.38]) by HOUEXCH903.landmark.lgc.com with Microsoft SMTPSVC(6.0.3790.0); Sun, 15 Aug 2004 16:17:01 -0500 X-MimeOLE: Produced By Microsoft Exchange V6.5.7226.0 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Subject: RE: Stdout of Java.execute() without going through a file? Date: Sun, 15 Aug 2004 16:17:01 -0500 Message-ID: X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: Stdout of Java.execute() without going through a file? Thread-Index: AcSCSOi78TB01TD3TlGz7xLjlFT7fwAwyeuw From: "Dominique Devienne" To: "Ant Developers List" X-OriginalArrivalTime: 15 Aug 2004 21:17:01.0830 (UTC) FILETIME=[34E2AA60:01C4830D] X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N > From: Vincent Massol [mailto:vmassol@pivolis.com] >=20 > I'm using the Ant Java task to start J2EE containers. However, in order to > know if they are started I'd like to read the stdout produced by these > containers. Now there are 2 solutions I know of: >=20 > - using java.setOutputProperty(). The problem is that the property is only > set when the execute() command returns which doesn't work for several > containers that do not return (Orion for example). >=20 > - using java.setOutput(File). However this goes to a file and I'd rather > not > use it for 2 reasons: I'd rather not have to output to a file as I may not > always have a handy location for that file (I'd rather not use tmp dir > either) + I'd like to make the file output optional, decided by the user. >=20 > My question: Is there a way I can use to monitor the stdout content > resulting from the execution of execute() without going through a file? Seems like you are doing this in code, rather than in XML, but in either case there is a third solution that uses or its underlying mechanism, BuildListerners. With , you'd be forced to go thru a file still, but by implementing your own listener like Record does, and installing it prior to Java.execute(), you can monitor the messages and do what you asked about it would seem. You can then uninstall the listener when you've detected the message you expected, or after Java.execute complete (or throws) in case the startup of the J2EE server failed. Not sure if this applies to what you had in mind without more details, but hopefully that helps. A+, --DD --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org For additional commands, e-mail: dev-help@ant.apache.org