ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Info" <>
Subject Re: exit codes (s/b KJS#00005(20030311a))
Date Wed, 12 Mar 2003 16:13:05 GMT
1. if you <exec> anything you can get the result code into a property; look
up <exec>
p124-131 for xml and ?ExecTask class?
2. are you trying to set the exit code of ant so that containers can call
it? It could be done with a new task <setExitCode code="234" /> *and* the
changes to ant.Main to pick this up and return it.

ForJava I currently use System.exit(nbr); so I am not seeing the need for a
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 the
answer in <exec>.

In the Execute class I see methods getExitValue and setExitValue.  Are these
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 to
me.  So, back to the books and the docs again!

jimS (

----- Original Message -----
From: "Steve Loughran" <>
To: "Ant Users List" <>
Sent: Tuesday, March 11, 2003 7:16 PM
Subject: exit codes (was Re: KJS#00004 Appendix_E (BookMarks) (20030311))

View raw message