ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jacob Kjome <>
Subject Re: exit code
Date Tue, 15 Apr 2003 20:34:16 GMT
At 01:17 PM 4/15/2003 -0700, you wrote:
>Donal Quinlan wrote:
>>We have had failonerror set to false for a long time. What we want to do 
>>now is make the build fail if the exit code is anything other than 0 or 
>>-1. Any ideas? I know how to do this if I can capture the exit code, but 
>>I do not know how to capture the exit code. We are using ant 1.5.2
>There is some attribute of <exec> that lets you name a property to stick 
>the exit code in, your test is simply a <condition> and then a <fail> from


It is used something like this...

     <target name="vizant" depends="download.vizant">
         <taskdef name="vizant" classname="net.sourceforge.vizant.Vizant" 
         <vizant antfile="build.xml" outfile=""/>
         <exec executable="dot" failifexecutionfails="false" 
             <arg line="-Tpng -o build.png"/>
         <fail unless="graphvizSuccess!">
         You probably need to install GraphViz which is a native program,
         not a Java library &gt;&gt;&gt;


>To unsubscribe, e-mail:
>For additional commands, e-mail:

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message