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 52467 invoked from network); 21 Jun 2000 22:09:40 -0000 Received: from mercury.sun.com (192.9.25.1) by locus.apache.org with SMTP; 21 Jun 2000 22:09:40 -0000 Received: from shorter.eng.sun.com ([129.144.123.35]) by mercury.Sun.COM (8.9.3+Sun/8.9.3) with ESMTP id PAA12010 for ; Wed, 21 Jun 2000 15:09:39 -0700 (PDT) Received: from [129.157.164.14] (muc-rem-4.Germany.Sun.COM [129.157.164.14]) by shorter.eng.sun.com (8.9.3+Sun/8.9.3/ENSMAIL,v1.7) with ESMTP id PAA05110 for ; Wed, 21 Jun 2000 15:09:34 -0700 (PDT) User-Agent: Microsoft-Outlook-Express-Macintosh-Edition/5.02.2022 Date: Wed, 21 Jun 2000 15:08:10 -0700 Subject: Re: [RFE] Richer Task Specification From: James Duncan Davidson To: Message-ID: In-Reply-To: Mime-version: 1.0 Content-type: text/plain; charset="US-ASCII" Content-transfer-encoding: 7bit X-Spam-Rating: locus.apache.org 1.6.2 0/1000/N on 2000/06/18 19:49, mpfoemme@ThoughtWorks.com at mpfoemme@ThoughtWorks.com wrote: > 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: > > > > > > > > ... I'm of mixed feelings on this. On the one side, I don't like what's below, on the other, I'm not sure I like the idea of static {...}... > 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: > > ="xslt-compile"/> Or this could be just a "depends" attrib.