ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Peter Reilly" <>
Subject Re: javax scripting for ant 1.7.0
Date Tue, 28 Nov 2006 18:17:04 GMT
On 11/28/06, Dominique Devienne <> wrote:
> On 11/27/06, Peter Reilly <> wrote:
> > As java6 will be released shortly (I think in december)
> > it would be nice to allow ant to use javax.scripting
> > for a script engine. I would allow oob (out of the box)
> > usage of a scripting language with ant on java6 and
> > allow scripting with languages that only have javax.scripting
> > engines (F3 for example - I think).
> +1 to oob.
> > I had proposed before to use the convention
> > language="jsr:javascript" to denote the jaxax.scripting
> > engine, and language="bsf:javascript" to denote the
> > bsf engine with language="javascript" to denote seaching
> > for the first implementation.
> I'd prefer we make it more explicit. Using a prefix is shorter of
> course, but I don't feel confortable using an XML namespace
> like notation without the need for an XML namespace.
> Couldn't we use an explicit 'engine' or 'scriptapi' new attribute,
> that would default to bsf, but would accept jsr (or jdk1.6) in a
> future release? Or even an engine "path", like "bsf, jsr" to
> specify a given search order?

I would rather have the prefix in the language attribute, however
an explicit attribute could be acceptable as well.

If the attribute is not specified a default path will be used - all
the scriptapi's that ant known about. - bsf, jsr.
the 1.7.0 behaviour would be to find the first
script manager in the classpath and to use that

Later versions of ant could check if a particular script manager
supported a particular language and use the first that "reported"
that it did.

If asked for, future versions of ant could use custom defined
script managers - using a JAR service specification - or an ant

> > The changes are very small the the current scripting classes.
> Hopefully what I propose above doesn't make it too complex. --DD
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

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

View raw message