ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alexey N. Solofnenko" <A.Solofne...@mdl.com>
Subject Re: Exec task's FailOnError switch doesn't work in my script?
Date Thu, 25 Mar 2004 00:50:43 GMT
cmd.exe does not return error code correctly. I had to write a script 
(launched with <script>) to look for a word FAILED in output in order to 
detect a failure on Windows.

- Alexey.

Sheldon Shi wrote:

>I have ant script auto_build.xml that contains the following exec task:
>
><project ...>
>
>    <target name="someBuild">
>        <exec executable="someBuild.bat" failonerror="true">
>            <arg line="arg1 arg2 -Doutput=blah"/>
>	  </exec>
>    </target>
>
></project>
>
>someBuild.bat invokes another build process using build.xml.
>When someBuild.bat fails, I'd like the overall build to fail. But right now
>this script still ends successfully. This is part of the output:
>
>someBuild:
>     ...
>     [exec]     [javac] 2 errors
>     [exec] 
>     [exec] BUILD FAILED
>     [exec] build.xml:385: Compile failed; see the compiler error output for
>details.
>     [exec] 
>     [exec] Total time: 7 seconds
>
>_nextTarget:
>
>BUILD SUCCESSFUL
>
>
>I am using Ant version 1.5. Thanks for help.
>
>Sheldon
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
>For additional commands, e-mail: user-help@ant.apache.org
>  
>

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


Mime
View raw message