ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Donald <pe...@apache.org>
Subject Re: ScriptDef
Date Fri, 15 Feb 2002 00:16:59 GMT
On Fri, 15 Feb 2002 10:44, Conor MacNeill wrote:
> > From: Tim Vernum [mailto:Tim.Vernum@macquarie.com]
> >
> > From: Peter Donald [mailto:peter@apache.org]
> >
> > > Similar to what I prototyped except with a syntax that did away with
> > > getters. Essentially it was simplified to just
> > >
> > > <scriptdef name="scripttest" language="javascript">
> > >   <param name="test" default="hello"/>
> >
> > +1
>
> My motivation was to make scripted tasks somewhat similar to a real task,
> as would be written in Java, particularly when using Rhino. I thought that
> would make it useful for quickly prototyping a task for later development
> in Java and also to introduce people to task development.
>
> In addition, the way I implemented <scriptdef> it can support nested
> elements, which are potentially repeated
>
> <scriptedTask>
>     <fileset ...>
>     <fileset ...>
> </scriptedTask>
>
> It is hard to support that capability with simple named parameters.
>
> Thoughts?

The way I did it was 

<scriptdef ... >
  <!-- for concrete implementations -->
  <element name="x" type="o.a.ant.FileSet"/> 
  <!-- for stuff sucked out of registry -->
  <element name="x" role="o.a.ant.Condition"/>
</scriptdef>

The same thing was repeated with the template task and a few other tasks that 
defined task-like facades.

>
> Conor

-- 
Cheers,

Pete

-----------------------------------------------
"Only two things are infinite, the universe and 
human stupidity, and I'm not sure about the 
former." -Albert Einstein 
-----------------------------------------------

--
To unsubscribe, e-mail:   <mailto:ant-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-dev-help@jakarta.apache.org>


Mime
View raw message