ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 47596] New: Unable to capture return code from Ant
Date Tue, 28 Jul 2009 13:53:10 GMT
https://issues.apache.org/bugzilla/show_bug.cgi?id=47596

           Summary: Unable to capture return code from Ant
           Product: Ant
           Version: 1.7.1
          Platform: Other
        OS/Version: Windows Server 2003
            Status: NEW
          Keywords: ErrorMessage
          Severity: normal
          Priority: P4
         Component: Other
        AssignedTo: notifications@ant.apache.org
        ReportedBy: larry.kriv@hp.com


When calling Ant from a Windows *.bat file, I am unable to capture the error
code from the build to make an intelligent and graceful recovery.  It appears
that the bat file abuptly ends when returning from the call.

I run the following, using a non-existant xml build file, so it will get a
legitimate error:

set ANT_HOME=C:\D_Drive\apache-ant-1.7.1
set PATH=%PATH%;%ANT_HOME%\bin;

echo * Error    =%errorlevel%
echo *******************
ant -f c:\temp\testAnt1.xml -diagnostics
echo *******************
echo * Error    =%errorlevel%
echo *******************

I do not get anything after the first set of stars.  I have even placed print
in ant.bat to ensure that a return code is indeed being set by Ant.

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

Mime
View raw message