Return-Path: Mailing-List: contact ant-dev-help@jakarta.apache.org; run by ezmlm Delivered-To: mailing list ant-dev@jakarta.apache.org Received: (qmail 64843 invoked from network); 19 Jun 2000 02:49:36 -0000 Received: from mother.thoughtworks.com (204.178.39.204) by locus.apache.org with SMTP; 19 Jun 2000 02:49:36 -0000 Subject: Re: [RFE] Richer Task Specification To: ant-dev@jakarta.apache.org Bcc: X-Mailer: Lotus Notes Release 5.0.2c February 2, 2000 Message-ID: From: mpfoemme@ThoughtWorks.com Date: Sun, 18 Jun 2000 21:49:27 -0500 X-MIMETrack: Serialize by Router on Mother/ThoughtWorks.COM/US(Release 5.0.2c |February 2, 2000) at 06/18/2000 09:51:02 PM MIME-Version: 1.0 Content-type: text/plain; charset=us-ascii X-Spam-Rating: locus.apache.org 1.6.2 0/1000/N What if we allow all tasks (as opposed to just properties and taskdefs) to be used outside of targets , and execute them on the spot? They would be similar to "static {...}" blocks in java, in that they get run as soon as the class/project is loaded. So at the top of your build file you could just put the following, which would cause the javac task to run before the taskdef: ... Or, if we decide to wait until execution time to instantiate tasks, we could add a "target" attribute to taskdef, which would cause that target to be built before loading the task class: ... Using this system, we can avoid compiling the task until we actually need to use it. Matt Foemmel ThoughtWorks, Inc. rubys@us.ibm. com To: ant-dev@jakarta.apache.org cc: 06/18/2000 Subject: Re: [RFE] Richer Task Specification 07:23 AM Please respond to ant-dev duncan wrote: > > Nested taskdef elements, with identical syntax to the current taskdef > > task, could be used to generate the necessary statements on > > the javac and then to define the mapping between classname and task > > name. Users could obviously add their own statements if > > necessary. > > Could you propose a sample of how this would be stated in XML? Here is a sample that could be useful in xml-fop: - Sam Ruby P.S. In order to further the discussion, I'm committing in an untested implementation. Monday(-ish) I'll test it and contribute documentation (unless somebody wishes to beat me to it).