From: "Peter Donald" <[EMAIL PROTECTED]>
To: "Ant Developers List" <[EMAIL PROTECTED]>
Sent: Monday, February 25, 2002 7:57 PM
Subject: Re: TaskAdapter and execute()
> I would prefer you write a new <taskdef/> that worked with whatever rules you
> 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" />
Jose Alberto
> On Tue, 26 Feb 2002 06:03, [EMAIL PROTECTED] wrote:
> > One of the changes I've made for better 'embedability' or
> > integration of ant is in TaskAdatper, the ability to
> > 'adapt' java beans using a different name for the execute method.
> >
> > For example, while most tomcat startup beans follow ant
> > conventions and would work perfectly in ant, we follow
> > the 'normal' java bean mechanisms with 'start()', 'stop()',
> > etc as names for methods.
> >
> > The change ( you can find it in sandbox for now ) allows
> > a different method to be used in the 'adapted' bean.
> > In addition, it allows 'noop' beans to be used - i.e.
> > the properties will be set and a ref registered, with no
> > action on the bean itself ( the bean can be used by another
> > bean using the ref ). While this may not be a big deal
> > ( adding an empty execute() is easy ), it helps for existing
> > classes.
> >
> > Opinions ? There are few (negative) tests that assume an
> > exception will be thrown if no execute() is found, and
> > obviously the beans would not work with ant1.4 ( since
> > it'll be a new feature ).
> >
> >
> > Costin
>
> --
> Cheers,
>
> Pete
>
> ---------------------------------------------------
> "Wise men don't need advice. Fools don't take it."
> -Benjamin Franklin
> ---------------------------------------------------
>
>
> --
> To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>