ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Steve Loughran" <>
Subject Re: exit codes (s/b KJS#00005(20030311a))
Date Wed, 12 Mar 2003 18:09:37 GMT

----- Original Message -----
From: "Info" <>
To: "Ant Users List" <>
Sent: Wednesday, March 12, 2003 08:13
Subject: Re: exit codes (s/b KJS#00005(20030311a))

> 1. if you <exec> anything you can get the result code into a property;
> up <exec>
> p124-131 for xml and ?ExecTask class?

I know  :)

That bit strangely lacks any mention of resultproperty. I say strangely as I
added resultproperty after writing that bit of the book, but guess I didnt
feel it merited a mention other than in the list of bullet points on p125.
and look up

> ForJava I currently use System.exit(nbr); so I am not seeing the need for
> new task "unless" ANT cannot see this exit value.  Could the Execute class
> getExitValue method be used to see the System.exit value?  Or is it just
> local to the process?  Okay, back to the books to see where I am missing
> answer in <exec>.

it does. But if you run <java> and do not fork, when you call
System.exit(0), ant itself suddenly grinds to a halt.

> In the Execute class I see methods getExitValue and setExitValue.  Are
> seen and usable by ANT - specificially the setExitValue?  Could I use the
> setExitValue with "if errorlevel"?  Is the value persistent? Is the value
> stored in system space (heap)?  Can ANT see and use these values by using
> <exec> processing as mentioned in the #1 response?  The docs seem silent
> me.  So, back to the books and the docs again!

Look at resultproperty in the Exec manual page.

View raw message