ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Felice Vittoria" <feli...@lycos.com>
Subject Re: Return code from Ant
Date Tue, 28 Oct 2003 04:29:36 GMT
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

--

--------- Original Message ---------

DATE: 27 Oct 2003 21:29:59 -060
From: Weiqi Gao <weiqigao@networkusa.net>
To: user@ant.apache.org
Cc: 

>Hi,
>
>I'm writing some Unix shell scripts that invoke several Ant build
>files.  However in my testing I discovered that Ant's return code is
>always 0 (this is the case for several tasks I tried) regardless of the
>success or failure of the targets invoked.
>
>Am I doomed in my attempt to run something like this:
>
>#!/bin/sh
>#
># Run buildfile1.  If successful, run buildfile2.
>#
>ant -f buildfile1.xml && ant -f buildfile2.xml
>
>Or is there some way around this problem?
>
>-- 
>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
>
>



____________________________________________________________
Enter for a chance to win one year's supply of allergy relief!
http://ad.doubleclick.net/clk;6413623;3807821;f?http://mocda3.com/1/c/563632/125699/307982/307982
This offer applies to U.S. Residents Only

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


Mime
View raw message