You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by bu...@apache.org on 2007/06/05 15:11:08 UTC

DO NOT REPLY [Bug 42588] New: - Ant return codes undocumented

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=42588>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=42588

           Summary: Ant return codes undocumented
           Product: Ant
           Version: 1.7.0
          Platform: All
               URL: http://ant.apache.org/manual/index.html
        OS/Version: other
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Documentation
        AssignedTo: dev@ant.apache.org
        ReportedBy: minfrin@sharp.fm


The manual entry for return codes contains the following sentence:

"the ant start up scripts (in their Windows and Unix version) return the return
code of the java program. So a successful build returns 0, failed builds return
other values."

At no point is a list given of what these other return codes are.

As a result, it is not possible to debug or analyse failures in ant scripts with
running ant in a debugger.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


DO NOT REPLY [Bug 42588] - Ant return codes undocumented

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=42588>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=42588


stevel@apache.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|1.7.1                       |---




------- Additional Comments From stevel@apache.org  2007-06-05 06:47 -------
- The exit codes vary from platform to platform...even if we exit -1 on Java, on
a SYSV system that would come out as 255. 

- similarly, if java itself fails, its with whatever reason java chose to fail.
these are platform specific. 

- Partly its laziness, we'd have to find every constructor of ExitStatus and
determine which error code is raised.

- and finally its complexity: there is nothing to stop tasks triggering an exit
if they try hard enough (throwing their own ExitStatus).

So all we could do at best it make a list of some possible failures you may see,
with the caveats that they may different on different platforms/java versions.
The 0==success rule is the only thing we can guarantee.

if you are debugging, I suggest you look at the following classes for more
details of what is going on.

http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/launch/Launcher.java?view=markup
http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/Main.java?view=markup
http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/ExitStatusException.java?view=markup

Peter: Launcher exits with a 2 for trouble, Main with a 1. so you can sort of
determine the origin...those values may be different by the time they go through
the .bat file though, the win9x one loses most of the data.

Someone could volunteer to define some exit codes, preferably in AntMain, as the
launcher imports that file. We'd then be able to have have the built in exit
codes formalised in the javadocs.



-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


DO NOT REPLY [Bug 42588] - Ant return codes undocumented

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=42588>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=42588


peterreilly@apache.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|FIXED                       |




------- Additional Comments From peterreilly@apache.org  2007-06-05 06:54 -------
Opps, Yes I did not see launcher,

I will pull the change made and mark this as wont fix.


-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


DO NOT REPLY [Bug 42588] - Ant return codes undocumented

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=42588>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=42588





------- Additional Comments From gudnabrsam@yahoo.com  2007-06-05 07:34 -------
To beat the living ##@% out of this dead horse, note that the error code can be buildfile-specific by using 
<fail status="666" /> or what-have-you...

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


DO NOT REPLY [Bug 42588] - Ant return codes undocumented

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=42588>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=42588


peterreilly@apache.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|REOPENED                    |RESOLVED
         Resolution|                            |WONTFIX




------- Additional Comments From peterreilly@apache.org  2007-06-05 06:54 -------
See #2

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


DO NOT REPLY [Bug 42588] - Ant return codes undocumented

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=42588>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=42588


peterreilly@apache.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED
   Target Milestone|---                         |1.7.1




------- Additional Comments From peterreilly@apache.org  2007-06-05 06:38 -------
Normally error code of one is used, - unless
the reason is due to a process failing, in which
case the error code of that process is used.

Use -verbose to get more info on the command-line
used (if this is the cause).

I have added a small note to the manual:
 For the most part error code of 1
is used for failed builds, however if the cause of the error is an external
process, the
error code of that process will be propagated.


-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org