Return-Path: Delivered-To: apmail-ant-user-archive@www.apache.org Received: (qmail 8409 invoked from network); 10 Aug 2006 14:48:20 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 10 Aug 2006 14:48:20 -0000 Received: (qmail 47244 invoked by uid 500); 10 Aug 2006 14:48:15 -0000 Delivered-To: apmail-ant-user-archive@ant.apache.org Received: (qmail 47213 invoked by uid 500); 10 Aug 2006 14:48:15 -0000 Mailing-List: contact user-help@ant.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Ant Users List" Reply-To: "Ant Users List" Delivered-To: mailing list user@ant.apache.org Received: (qmail 47202 invoked by uid 99); 10 Aug 2006 14:48:15 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 10 Aug 2006 07:48:15 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [198.71.73.25] (HELO mx2.nuance.com) (198.71.73.25) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 10 Aug 2006 07:48:04 -0700 Received: from unknown (HELO pb-exchcon2.nuance.com) ([10.1.4.118]) by mx2.nuance.com with ESMTP; 10 Aug 2006 10:47:37 -0400 X-IronPort-AV: i="4.08,111,1154923200"; d="scan'208"; a="6263890:sNHT26822306" Received: by pb-exchcon2.pb.scansoft.com with Internet Mail Service (5.5.2658.27) id ; Thu, 10 Aug 2006 10:47:37 -0400 Message-ID: From: "Tzabari, Gili" To: Ant Users List Subject: RE: Custom task invoking other tasks Date: Thu, 10 Aug 2006 10:47:38 -0400 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2658.27) Content-Type: text/plain X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Many thanks! Gili -----Original Message----- From: Antoine Levy-Lambert [mailto:antoine@gmx.de] Sent: Wednesday, August 09, 2006 6:28 PM To: Ant Users List Subject: Re: Custom task invoking other tasks Hello Gili, you can construct your Java task instance in two ways : a) for Ant 1.6 code Java myjava = (Java) getProject().createTask("java"); or b) for Ant 1.7 code Java myjava = new Java(); myjava.bindToOwner(this); myjava.init(); in both cases you need to set afterwards all the attributes which you want your java task instance to have, such as myjava.setClassname("org.foo.bar.doit"); Regards, Antoine -------- Original-Nachricht -------- Datum: Wed, 9 Aug 2006 16:20:21 -0400 Von: "Tzabari, Gili" An: Ant Users List Betreff: Custom task invoking other tasks > Hi, > > > > I'd like my custom task to invoke the Java task. Do I simply > construct a new instance of org.apache.tools.ant.taskdefs.Java and > execute() > it? Or is there a nicer convention for chaining tasks programmatically > (not > in the build.xml side, but rather on the Java end)? > > > > Thanks, > > Gili > --------------------------------------------------------------------- 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