Java Mailing List Archive

http://www.ant-tasks.com/

Apache Ant Archive

» Ant Users List
» Ant Developers List
exit codes (was Re: KJS#00004 Appendix_E (BookMarks) (20030311))

exit codes (was Re: KJS#00004 Appendix_E (BookMarks) (20030311))

2003-03-11       - By Steve Loughran


----- Original Message -----
From: "Info" <Info@(protected)>
To: "Ant Users List" <ant-user@(protected)>
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
the
> suggestion as a vanilla part of ANT rather than using a plug-in that may
be
> 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
have
> 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
those
> 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.



©2008 ant-tasks.com - Jax Systems, LLC, U.S.A.