Return-Path: Mailing-List: contact dev-help@ant.apache.org; run by ezmlm Delivered-To: mailing list dev@ant.apache.org Received: (qmail 30305 invoked from network); 27 Feb 2003 23:25:59 -0000 Received: from junior.lgc.com (134.132.72.99) by daedalus.apache.org with SMTP; 27 Feb 2003 23:25:59 -0000 Received: from lgchvw01.lgc.com (lgchvw01.lgc.com [134.132.93.107]) by junior.lgc.com (8.11.3/8.11.3) with SMTP id h1RNP1B15213 for ; Thu, 27 Feb 2003 17:25:01 -0600 (CST) Received: from 134.132.93.152 by lgchvw01.lgc.com (InterScan E-Mail VirusWall NT); Thu, 27 Feb 2003 17:26:05 -0600 Received: by lgchexchbh.ad.lgc.com with Internet Mail Service (5.5.2653.19) id <1C73XNNK>; Thu, 27 Feb 2003 17:26:05 -0600 Message-ID: From: Dominique Devienne To: "'Ant Developers List'" Subject: RE: Trouble using user properties in custom Ant task, help!!! Date: Thu, 27 Feb 2003 17:26:04 -0600 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2653.19) Content-Type: text/plain X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N That said, I think the Antelope project on SF added a custom task allowing just that, returning properties to the parent process. But this is very unlikely to ever make it to Ant proper. --DD -----Original Message----- From: Dominique Devienne [mailto:DDevienne@lgc.com] Sent: Thursday, February 27, 2003 5:24 PM To: 'Ant Developers List' Subject: RE: Trouble using user properties in custom Ant task, help!!! Ant 101: Properties set during an are not visible to the callee (which lives in a different Project). This has nothing to do with using , , or your custom task for that matter. --DD -----Original Message----- From: Barry Lulas [mailto:blulas@noteworthyms.com] Sent: Thursday, February 27, 2003 4:58 PM To: dev@ant.apache.org Subject: Trouble using user properties in custom Ant task, help!!! I have a custom task that extends the Java task because I want to be able to conditionalize on the exit code of the Java application. I can't use the exec task because I have the need to specify JVM parameters and also have a very complicated classpath, for which I use a series of path elements. My custom task simply looks at the exit code of the application and sets the exitCode property. Simple enough. Okay, now the problem comes in. I have a target that uses this custom task: This all works fine. However, if I invoke this target from another target, using antcall, then the property doesn't seem to be set in my calling target: The output from Ant looks like this: [echo] Server running... [echo] EXIT CODE is 1 [echo] This is the exit code of the client: ${exitCocde} As you can see, it treats the first echo command like the property is set, it shows the value. However, in the calling target it treats it like it hasn't been set. Can this be a by-product of using the parallel and sequential tasks? Also, can somebody show me an example of how to conditionalize a call based on the exitCode property, if and when it is properly set? Thanks for any help! --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org For additional commands, e-mail: dev-help@ant.apache.org