Return-Path: Mailing-List: contact dev-help@ant.apache.org; run by ezmlm Delivered-To: mailing list dev@ant.apache.org Received: (qmail 12574 invoked from network); 13 Mar 2003 17:07:28 -0000 Received: from hplb.hpl.hp.com (192.6.10.2) by daedalus.apache.org with SMTP; 13 Mar 2003 17:07:28 -0000 Received: from snowy.hpl.hp.com (snowy.hpl.hp.com [15.144.94.243]) by hplb.hpl.hp.com (8.12.8/8.12.1/HP Labs Bristol relay) with ESMTP id h2DH7IeP001289 for ; Thu, 13 Mar 2003 17:07:18 GMT Received: from ranier (ranier.cv.hp.com [15.87.25.18]) by snowy.hpl.hp.com with SMTP (8.9.3 (PHNE_25183+JAGae58098)/8.7.3 SMKit7.0) id RAA29061 for ; Thu, 13 Mar 2003 17:07:15 GMT Message-ID: <001d01c2e983$183a3290$1219570f@ranier> From: "Steve Loughran" To: "Ant Developers List" References: Subject: Re: [PATCH] Ant Task - Proposed Enhancement Date: Thu, 13 Mar 2003 09:07:53 -0800 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1106 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 X-MailScanner: Found to be clean X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N I am more minded to put the subant in there, with perhaps some minor tweaks. The reason to use a separate task when there are major changes in functionality are (a) we can have more sensible defaults (here: property inheritance, and what happens when you invoke a target called "" . I'd like that to be the default, but in you get the target called "" instead. (b) guarantee of zero backwards compatibility issues. If I start with adding to CVS, will you work with us to make sure your needs are met in the new task, which includes pasting in all the bits of this patch that help. I like the memory stuff, BTW -we do need to fight leakage here. -steve ----- Original Message ----- From: "Andrew Goodnough" To: Sent: Thursday, March 13, 2003 07:26 Subject: [PATCH] Ant Task - Proposed Enhancement > The current ant task runs an ant process for a specified build file in a > specified directory. I wanted to be able to give it more than one > directory, and execute the build file found in each directory specified, > or give it a set of build files to execute. This can be really useful > for building projects on which this project depends (could be > sub-projects but doesn't have to be). I understand that this > enhancement overlaps with the proposed SubAnt task but I feel that this > function is really the domain of the existing Ant task, so rather than > adding another task, the Ant task should be enhanced - especially when > it only involves adding a couple contained types that users already know > how to use in other contexts. > > This enhancement adds the ability to specify multiple directories with > the addition of a contained type or multiple files with the > addition of a contained type. One can also specify both > DirSets and FileSets together, as well. This allows the task to run ant > processes on the directories specified (by appending the default > "antFile" to them), or on the set of files specified. {see > ANT_HOME\src\etc\testcases\taskdefs\ant.xml for examples in the attached > zip file} > > I've run all of the current and new tests on the task and all passed. > Most of the original logic flow is unchanged (although it doesn't seem > that way due to refactoring). In a nutshell, I added a for loop to the > execute method to loop through the each directory and each file > specifed, and execute the target on each. {see "diff.txt" in the > attached zip file} > > Tell me what you think. > > Andy > > > > Using directory structure > ************************* > /sub1 > build.xml > /sub2 > build.xml > /sub3 > build.xml > > > A typical build file could use the new task like this: > > > > > > > classname="org.apache.tools.ant.taskdefs.AntNew"/> > > > > > > > ... > > > > more examples pasted from testcases: > > > > > > > > > > > > > > > > > > includes="sub1/build.xml,sub2/build.xml,sub3/build.xml"/> > > > > > > > > > > > > > > > > > > > > ---------------------------------------------------------------------------- ---- > --------------------------------------------------------------------- > To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org > For additional commands, e-mail: dev-help@ant.apache.org