ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Donald <dona...@apache.org>
Subject Re: [Ant2] Tasks as siblings of <target>
Date Sun, 21 Oct 2001 10:40:55 GMT
On Sun, 21 Oct 2001 20:03, Jose Alberto Fernandez wrote:
> From: "Peter Donald" <donaldp@apache.org>
>
> > > Define tasks using a scripting language (like javascript) and allow
> > > invoking such tasts simillar to regular tasks. This will definetly need
> > > some new datastructure to store the definition which differs from what
> > > regular taskdef do today.
> >
> > No it doesn't.
>
> Why do you think it does not? 

I can't see any reason for it to and when I prototyped it like a year ago 
(with mozillas javascript engine - forget what it is called) no such need 
popped up. It also has parrallels with the generic type tasks I played with 
that are still in myrmidon propossal in CVS (I think???).

> Can you be more specific?

The definition of a task essentially comes down to a class that implements 
Task interface and is loadable via a ClassLoader. So essentially anything 
that satisfies these conditions works. Much like servlet can also have 
"script" instances ala jsp/xsp/etc that are actually servlets. Or if you want 
runtime interpretation - our very own and very kool Velocity project does 
that.

It requires a bit of smarts when writing the "engine" servlet (ie jasper, 
cocoon and velocity servlet classes) but is relativly easy to write the 
actual scripts. The same is largely true of the task scripting engine as far 
as I can see.

This has to do with the stuff I was pushing about a year and a half ago of 
allowing tasks to access their own model (though I used different words back 
then). Stefan -1'ed it back then because the use of it was extremely limited 
but I think I can convince him different this time round (can I?) and besides 
- now I am a committer ;)

-- 
Cheers,

Pete

----------------------------------------------------------------
Fools ignore complexity.  Pragmatists suffer it.
Some can avoid it.  Geniuses remove it.
-- Perlis's Programming Proverb #58, SIGPLAN Notices, Sept. 1982
----------------------------------------------------------------


Mime
View raw message