Return-Path: Mailing-List: contact user-help@ant.apache.org; run by ezmlm Delivered-To: mailing list user@ant.apache.org Received: (qmail 80976 invoked from network); 11 Apr 2003 23:17:00 -0000 Received: from adsl-63-203-244-18.dsl.snfc21.pacbell.net (HELO mail.funkware.com) (63.203.244.18) by daedalus.apache.org with SMTP; 11 Apr 2003 23:17:00 -0000 Received: from xaman-ek.funkware.com (xaman-ek.funkware.com [127.0.0.1]) by mail.funkware.com (8.12.6/8.12.6) with ESMTP id h3BNH7Ao004986 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO); Fri, 11 Apr 2003 16:17:07 -0700 Received: (from altitude@localhost) by xaman-ek.funkware.com (8.12.6/8.12.6/Submit) id h3BNH7nH004984; Fri, 11 Apr 2003 16:17:07 -0700 Date: Fri, 11 Apr 2003 16:17:07 -0700 From: tka@funkware.com To: user@ant.apache.org Cc: tka@funkware.com Subject: Can i call execute() on a std task from within a custom task? Message-ID: <20030411231707.GA4942@funkware.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.1i X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N Hello. Is it legal to call the Java API "execute()" method on a standard task from within a custom task? For example, in my product, i have a list of jar files that i need to create: say "a.jar", "b.jar", and "c.jar". I could do something like this... However, i'm creating a build pattern/system for multiple products in my company, so at build time, i the definition of what jar files are to be created is defined in a custom configuration file (that i already wrote a custom parser for since it's not in anything "standard"). The jars i'm creating are completly based in the configuration. It could be anything such as "a.jar", "b.jar", and "c.jar" like above...but it also could be "a.jar", "c.jar", and d.jar...or even just "a.jar". So i figured i'd write a custom task that would create the jar files. I could use my own logic to create the jar files, but i'd like to know if it is "legal" for me to do something like this in the execute() method of my custom task: public void execute() throws BuildException { org.apache.ant.taskdefs.Jar jar = new Jar(); jar.setDestFile ( f ); jar.addFileset ( fileset ); jar.execute(); } TIA -tka