ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Lindsey, Lucinda" <lali...@sandia.gov>
Subject <exec> task and failonerror attribute
Date Tue, 28 Oct 2003 22:53:04 GMT
Hi,

I'm converting a pdf document to postscript using the <exec> task like this:

 <target name="pdf">
    <exec executable="acroread" failonerror="true"
failifexecutionfails="true">
        <arg line="-toPostScript afile.txt"/>
    </exec>
  </target>


This results in an error from acroread stating "No such file or directory"
(which is what I'm expecting) but the build is successful. 
-How can I make the build fail if acroread fails in any form? 
-Do I have to write my own script that returns a return code other than 0
for the failonerror to work in this case? 
-In general, we would like to call many types of scripts/programs with
<exec>. Do these scripts/programs have to return a nonzero return code so
that failonerror="true" stops the build process and fails? 

Thanks for the help,

Cindy Lindsey
Sandia National Labs
(505)844-0548



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


Mime
View raw message