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 5137 invoked from network); 21 Dec 2000 04:45:43 -0000 Received: from pscgate.progress.com (192.77.186.1) by locus.apache.org with SMTP; 21 Dec 2000 04:45:43 -0000 Received: from elvirus.progress.com (elvirus [192.77.186.100]) by pscgate.progress.com (8.10.2/8.10.2/PSC-4.01) with ESMTP id eBL4jfO17276 for ; Wed, 20 Dec 2000 23:45:41 -0500 (EST) Received: from progress.COM (localhost [127.0.0.1]) by elvirus.progress.com (8.10.2/8.10.2/PSC-4.01) with ESMTP id eBL4lLU19598 for ; Wed, 20 Dec 2000 23:47:21 -0500 (EST) Received: from naserv.bedford.progress.com (naserv [172.16.5.174]) by progress.COM (8.7.2/PSC-1.0) with ESMTP id XAA29827 for ; Wed, 20 Dec 2000 23:45:39 -0500 (EST) Received: from progress.com ([172.16.107.175]) by naserv.bedford.progress.com (Netscape Messaging Server 4.15) with ESMTP id G5WIK300.TGV for ; Wed, 20 Dec 2000 23:45:39 -0500 Message-ID: <3A418AF3.684846A2@progress.com> Date: Wed, 20 Dec 2000 23:45:39 -0500 From: "Bill Burton" Organization: Progress Software Corporation X-Mailer: Mozilla 4.75 [en] (WinNT; U) X-Accept-Language: en-US,ja MIME-Version: 1.0 To: ant-user@jakarta.apache.org Subject: Re: Multiple builds and failures References: <062569BB.0066D034.00@smtp.lawson.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Spam-Rating: locus.apache.org 1.6.2 0/1000/N Hi Dave, Ant doesn't have anything like make -k letting you continue despite errors. If you are really stuck and willing to hack the code a bit, the class taskdefs/Ant.java which implements could be modified to take a new attribute failonerror (like the exec task) where the default is true. When you don't want a failure in a called build.xml to stop the whole build, you would set failonerror="false" like this: To implement this, add a new method setFailOnError to Ant.java (see ExecTask.java) with a default true value. Then modify the execute method to catch BuildException. If failonerror is true, rethrow the exception else do nothing except possibly output a warning message. This change would prevent a BuildException generated in the called build.xml from getting propagated up to the caller build.xml thus stopping your whole build. I suppose a similar change could be made to CallTarget.java so would trap any BuildExceptions in the called target. -Bill Burton David.Bailey@lawson.com wrote: > > Howdy. > > I'm building my way down a directory tree using build.xml files in every > subdirectory and a chain of tasks in each build.xml. I believe > I have to do it this way because certain subdirectories need special handling, > and I only want to make changes (when they are necessary) in a single build.xml > file. > > My problem is this. I want ant to try to build everything every time, even when > one of the tasks in a subdirectory fails. Sometimes an error in a > single subdirectory will be fatal to everything in the build, and sometimes not. > I want ant to make a strong effort to build everything every time, regardless of > errors. > > It appears, however, that a single error in one subdirectory halts the entire > build. I'm assuming that this is due to the fact that ant slurps up all the > data in all the build.xml files and tries to execute everything in one fell > swoop with a single JVM. So the question is, short of using with the > 'fork' attribute to perform each separate build, is there any way to get ant to > continue building regardless of errors it may encounter? > > Thanks, > > --dave