ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Srikrishna.Par...@wellsfargo.com
Subject RE: Exec task's FailOnError switch doesn't work in my script?
Date Thu, 25 Mar 2004 00:52:16 GMT
Can you send the code ? 

-----Original Message-----
From: Alexey N. Solofnenko [mailto:A.Solofnenko@mdl.com] 
Sent: Wednesday, March 24, 2004 4:51 PM
To: Ant Users List
Subject: Re: Exec task's FailOnError switch doesn't work in my script?

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

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


Mime
View raw message