ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <>
Subject Re: TaskAdapter and execute()
Date Tue, 26 Feb 2002 03:53:50 GMT
On Tue, 26 Feb 2002, Jose Alberto Fernandez wrote:

> > I would prefer you write a new <taskdef/> that worked with whatever rules
> > wanted to use and used your own adapter rather than growing ants base adapter
> > 
> I agree. Of course on <antlib>'s proposal you just need to add a new role with
> a new Adapter and the same TaskContainer interface and presto ;-)
>     <role name="start-stop-task" class="o.a.t.ant.TaskContainer"
>             adapter="my.funny.TaskAdapter" />
>     <start-stop-task name="tomcat-a" class="my.tomcat.Bean" />

Ok, if 2 agree I'll rewrite my code so it can be implemented by 
external tasks.

I can't understand how <role whatever> is more intuitive then 
what I proposed:

  <taskdef name="tomcat" class="..." />
  <tomcat do="start" /> 

IMHO having an intuitive syntax is the most important thing, 
but I'm used with workarounds.

I'll commit a different change that makes 
Project.createTask() use a TaskFactory - and that will allow
user code ( i.e. external tasks ) to plug in a different TaskAdapter.

BTW, it seems that a pluggable TaskFactory will also solve
the ClassLoader problem ( at least for me ) - since the plugin
can implement whatever policy it wants. 

I'm still working on it, I want the new interface to work well
with namespaces.


P.S.: all this discussion on ClassLoader and TaskAdapter 
is just another good argument why the so-called 'ant2 as 
a new codebase' idea is fundamentally  wrong - I haven't seen this kind 
of review and debate going into any of the proposals,
and I certainly want to be sure that whatever will be changed
in ant2 will get the chance of a similarly rigurous analyse - 
change by change.

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

View raw message