Return-Path: Mailing-List: contact ant-user-help@jakarta.apache.org; run by ezmlm Delivered-To: mailing list ant-user@jakarta.apache.org Received: (qmail 14604 invoked from network); 1 Feb 2001 16:55:19 -0000 Received: from f102.law12.hotmail.com (HELO hotmail.com) (64.4.19.102) by h31.sny.collab.net with SMTP; 1 Feb 2001 16:55:19 -0000 Received: from mail pickup service by hotmail.com with Microsoft SMTPSVC; Thu, 1 Feb 2001 08:54:56 -0800 Received: from 62.213.135.66 by lw12fd.law12.hotmail.msn.com with HTTP; Thu, 01 Feb 2001 16:54:55 GMT X-Originating-IP: [62.213.135.66] From: "=?iso-8859-1?B?TWljaGHrbCBTbWl0aA==?=" To: ant-user@jakarta.apache.org Subject: Re: Possible bug with failonerror attribute of exec task Date: Thu, 01 Feb 2001 17:54:55 +0100 Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1; format=flowed Message-ID: X-OriginalArrivalTime: 01 Feb 2001 16:54:56.0192 (UTC) FILETIME=[B4617C00:01C08C6F] X-Spam-Rating: h31.sny.collab.net 1.6.2 0/1000/N I'm now sure this is a bug. When I exec a java class it works as expected (detects the error level and the build fails). When I execute a batch file, which in turn executes the java class, even though the batch file prints a non-zero error level, the build still succeeds. So the bug is this: failonerror does not work when executing a batch file (on windows 2000). Micha�l >I believe I have found a bug with the failonerror attribute of the exec >task. Here is part of my build.xml: > > > > > > executable="test.bat" os="Windows 2000" failonerror="True"/> > > >For the failonerror I tried "true" "True" "yes" "Yes". I'm not sure which >is correct because it's not documented. Here is my batch file: > >dir asdf >echo errorlevel = %ERRORLEVEL% > >This always has errorlevel = 1. > >Finally the output of my build: > >Ant version 1.2 compiled on October 24 2000 > >Buildfile: build.xml >Detected Java Version: 1.3 >Detected OS: Windows 2000 >Project base dir set to: Z:\Common\catapult\bin >Build sequence for target `test' is [test] >Complete build sequence is [test, init, shutdown_test_environment, tests, >build_tar, deploy_tar, init_test_environment, clean, usage, label, build] > >-- Building and executing tests: > > [exec] Myos = Windows 2000 > [exec] test.bat > [exec] > [exec] Fichier introuvable > [exec] Z:\customer_registry\customer\build>dir asdf > [exec] Le volume dans le lecteur Z s'appelle CCase > [exec] Le num‚ro de s‚rie du volume est 0234-5789 > [exec] > [exec] R‚pertoire de Z:\customer_registry\customer\build > [exec] > [exec] > [exec] Z:\customer_registry\customer\build>echo errorlevel = 1 > [exec] errorlevel = 1 > >BUILD SUCCESSFUL > >Total time: 1 second > >Micha�l > >_________________________________________________________________________ >Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com. > _________________________________________________________________________ Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.