ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Donald <>
Subject Re: [Ant2] Tasks as siblings of <target>
Date Mon, 05 Nov 2001 23:11:23 GMT
On Tue, 6 Nov 2001 03:50, Tim Dawson wrote:
> > a) restrict the possible tasks inside init to just those required (which
> > doesn't include all those property/available/etc) which most people would
> not
> > find useful
> > b) make thse constructs tasks which would require tight coupling between
> > runtime and tasks which would unduly restrict future evolution
> I disagree. There's no reason to make such a restriction that I can see.


> In fact, the property/available/etc. might be required in order to do task
> definitions properly.


> Right now, its possible to define a task after building it in the same
> file. Or at least it was with 1.3, I haven't tried it in a while because
> I'm on some new projects that don't need that.

it will still be possible in ant2 but the standard approach will be to use 
<import/> (like import for java). Thus hopefully the use of oldstyle taskdef 
will be minimized.

> Executing the init target (if defined) would validate it (it would fail if
> it wasn't valid). You could then validate the rest of the file. Problem
> solved,
> as far as I can see.

the solution to problem is to avoid problem? I don't see that as a good 
thing. We want to validate the build file as much as we can before execution 

> > c) not intuitive - imagine you had to search through a
> >    java file for an init method and inside that was located
> >    all the java import statements.
> No, I think its very intuitive. Imagine you had a method in every
> object that could get called when its created. Oh, wait, Java does have
> those, they're called constructors. :-)


You were talking about "supposedly preprocess/validation requires top-level 
tasks". These constructs are not tasks but import statements. What place do 
they have being in a constructor ?



"The only way to discover the limits of the possible 
is to go beyond them into the impossible." 
                             -Arthur C. Clarke

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message