Return-Path: Delivered-To: apmail-ant-user-archive@www.apache.org Received: (qmail 72014 invoked from network); 14 Oct 2003 15:07:43 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 14 Oct 2003 15:07:43 -0000 Received: (qmail 88333 invoked by uid 500); 14 Oct 2003 15:07:27 -0000 Delivered-To: apmail-ant-user-archive@ant.apache.org Received: (qmail 88295 invoked by uid 500); 14 Oct 2003 15:07:27 -0000 Mailing-List: contact user-help@ant.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Ant Users List" Reply-To: "Ant Users List" Delivered-To: mailing list user@ant.apache.org Received: (qmail 88282 invoked from network); 14 Oct 2003 15:07:27 -0000 Received: from unknown (HELO tdsi-mm-tor01.CORP.TDSECURITIES.COM) (142.205.240.97) by daedalus.apache.org with SMTP; 14 Oct 2003 15:07:27 -0000 Received: from TDSI-IMS-TOR01.CORP.TDSECURITIES.COM (Not Verified[49.50.20.46]) by tdsi-mm-tor01.CORP.TDSECURITIES.COM with NetIQ MailMarshal (v5.5.3.17) id ; Tue, 14 Oct 2003 11:07:28 -0400 Received: from TDSI-EXCH-TOR2.CORP.TDSECURITIES.COM ([49.50.20.32]) by TDSI-IMS-TOR01.CORP.TDSECURITIES.COM with Microsoft SMTPSVC(5.0.2195.5329); Tue, 14 Oct 2003 11:07:28 -0400 X-MimeOLE: Produced By Microsoft Exchange V6.0.6375.0 content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Subject: RE: Nested Tasks Date: Tue, 14 Oct 2003 11:07:28 -0400 Message-ID: <4D85E67FF7BC564AA33DC6DF1E134DF002BB0FE5@TDSI-EXCH-TOR2.CORP.TDSECURITIES.COM> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: Nested Tasks Thread-Index: AcOSZKCuFkf9opv2ShKfgXOMO2wFKgAAAvJA From: "Bender, Christopher" To: "Ant Users List" X-OriginalArrivalTime: 14 Oct 2003 15:07:28.0730 (UTC) FILETIME=[E2489BA0:01C39264] X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N yeah, thanks for all the help. The error was actually with the way ant = was handling the xml. In my actual build file i had a task called = something like Task1, with a capitol T. When a task is nested, ant was = converting all names to task1, with s small case t. That is why they = would work individually but not nested. ant could find Task1 bc i def'd = that, but task1 was not defd -----Original Message----- From: peter reilly [mailto:peter.reilly@corvil.com] Sent: Tuesday, October 14, 2003 11:05 AM To: Ant Users List Subject: Re: Nested Tasks On Tuesday 14 October 2003 15:38, peter reilly wrote: > It does in ant 1.6. > In ant 1.5 it does not as the task > would have already been resolved. > > If execute is not used in ant 1.6 I get Opps that should if execute is used.. > the error you are getting: > Could not create task of type: task2 > > Just make sure that you are not running ant 1.6. > > Peter I have used the class you posted in package task with a build build as follows: and task2 defined as: package task; import org.apache.tools.ant.Task; public class Task2 extends Task { public void execute() { System.out.println("Hello world"); } } This works fine for ant 1.5.4 but fails with ant 1.6. Peter > > On Tuesday 14 October 2003 15:31, Bender, Christopher wrote: > > ok but that doesnt help ant find the task. > > but thanks for that, i remember reading to call perform somewhere. > > > > -----Original Message----- > > From: peter reilly [mailto:peter.reilly@corvil.com] > > Sent: Tuesday, October 14, 2003 10:28 AM > > To: Ant Users List > > Subject: Re: Nested Tasks > > > > On Tuesday 14 October 2003 15:15, Bender, Christopher wrote: > > > private void executeChildren() { > > > Iterator taskItr =3D tasks.iterator(); > > > while (taskItr.hasNext()) { > > > ((Task)taskItr.next()).execute(); > > > } > > > > You need to do ((Task)taskItr.next()).perform() and not > > execute. > > > > Peter > > > > = --------------------------------------------------------------------- > > 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 --------------------------------------------------------------------- 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