ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Steve Loughran" <>
Subject exit codes (was Re: KJS#00004 Appendix_E (BookMarks) (20030311))
Date Wed, 12 Mar 2003 01:16:07 GMT

----- Original Message -----
From: "Info" <>
To: "Ant Users List" <>
Sent: Tuesday, March 11, 2003 16:14
Subject: ANT: KJS#00004 Appendix_E (BookMarks) (20030311)

> In the Manning & Sams books and onLine, I have not found an equivalent to
> the 'c' exit(nbr) and the batch "if errorlevel" (as appropriate for an
OS) -
> at least that I recognize.  A page number in the books would work.  I am
> very aware of try/catch/... type of processing and can control graceful
> termination or continuation - this is not what I need.  I need the
> capability at the system level for ANT-use to be able to make equivalent
> decisions that we currently have in place using exit(nbr).  Would prefer
> suggestion as a vanilla part of ANT rather than using a plug-in that may
> a more sophisticated version of the interim-'c'/assembler/Java/ANT munge
> that gets the job done but is really scary!  Said another way, we could
> from 0 to 255 possible processing-outcomes that need to launch the next
> processing step and not as a Java thread (we have more than enough of
> dealing with the outliars and processing leverage-points)!

0. meaningful subject lines are good

1. if you <exec> anything you can get the result code into a property; look
up <exec>

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.

View raw message