ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ru...@us.ibm.com
Subject RE: [RFE] Richer Task Specification
Date Wed, 14 Jun 2000 18:59:19 GMT


>>> Could taskdefs be specified immediately. ie. move the main
>>> chunk of it from init to execute.
>>
>> count this as a second vote ;)
>
>Motion thirded.

This has me intrigued.  I do not believe it is as simple as moving this
code from init to execute.  The trouble is that Ant constructs instances of
all the tasks up front (calling init as it goes), then goes off and
executes them.  Defering the taskdef to execute means that the new tasks
will not be defined in time.

An alternative would be to allow taskdefs to be deferred as an option.
What that would do instead of creating the "real" task is to create a
instance of a new class, say "proxyTask".  This task would be special and
would simply accumulate the attributes, as well as being passed the name of
the real task.  When it comes time to execute this task, it would attempt
to create an instance of the real task, apply all the attributes, and
finally invoke init followed by execute.

What I like about this proposal is that virtually all the complexity is
internal - the user can be blissfully unaware of the internal machinery
required to make this work.

- Sam Ruby



Mime
View raw message