help-make
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Checking return code from Ant


From: dhay
Subject: Checking return code from Ant
Date: Tue, 19 Mar 2002 16:35:06 -0500

Hi everyone.  I have a strange situation which I was wondering if anyone could
help me with:

I call Ant from within a make file.  However, if Ant fails, the make file
continues to run as if no problem occurred.

I call Ant through its batchfile ant.bat, and ant's errorlevel value when it
returns is definitely 1 when it fails.  Although this doesn't seem to get passed
back to make for some reason, if I create another batch file, say called
antWithRC.bat, and put the following line in it, it blows up with ant fails, and
causes the make to stop.

antWithRC.bat:
ant %1 %2 %3 %4 %5 %6 %7 %8 %9 && if errorlevel 1 goto noop
:noop

I can add anything after the "if errorlevel 1" check, and it doesn't seem to
matter.

Can anyone explain what is happening, please?!  It seems very strange to me!!

Many thanks,

David






reply via email to

[Prev in Thread] Current Thread [Next in Thread]