ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Weiqi Gao <weiqi...@networkusa.net>
Subject Re: Return code from Ant
Date Tue, 28 Oct 2003 04:52:37 GMT
On Mon, 2003-10-27 at 22:29, Felice Vittoria wrote:
> have you tried doing something like this:
> 
> ant -f buildfile1.xml
> if $? = 0 ; then 
>    echo "Ant build 1 passed ... running build 2 ..."
>    ant -f buildfile2.xml
> else
>    echo "Ant build 1 failed."
> fi

That's exactly my problem: no matter what happens in buildfile1.xml, $?
is always 0.  Even if the task failed.

I was deleting some files in buildfile1.xml.  The files can't be deleted
because of permission problems.  Ant is nice enough to print a detailed
message:

[delete] deleting xxxx failed, no permission! (I'm paraphrasing here.)
BUILD FAILED

But the return value from Ant is 0.

-- 
Weiqi Gao
weiqigao@networkusa.net
http://www.weiqigao.com


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


Mime
View raw message