ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Conor MacNeill <>
Subject Re: ScriptDef
Date Fri, 15 Feb 2002 11:07:12 GMT
Stefan Bodewig wrote:

> On Fri, 15 Feb 2002, Conor MacNeill <>
> wrote:
>>My motivation was to make scripted tasks somewhat similar to a real
>>task, as would be written in Java, particularly when using Rhino.
> But this approach comes at some cost, as you are potentially locking
> out languages supported by BSF - which Peter's approach would not.

I am only talking to BSF so it is possible that other scripting 
languages may also work. I'd certainly like to try BeanShell as well. It 
will depend on if and how the particular BSFEngine supports the call() 
method. I've only tested it out with Rhino, which is an important start 
for me.

> You could still use a reflection like mechanism inside scriptdef to
> actually set the parameters for languages where you can do it that
> way, all that would have to change was that you'd have to declare your
> parameters explicitly.

Well attributes could be done as "declareBean" calls. I'm note sure 
about nested elements. Maybe as arrays in a declareBean call. Yes, maybe 
that would work as well.

>>In addition, the way I implemented <scriptdef> it can support nested
>>elements, which are potentially repeated
>>It is hard to support that capability with simple named parameters.
> It is possible, but cumbersome.

OK, arrays would be possible.

> I see this part as something that is vaguely related to setting user
> preferences.  Something like:
>     I want to always have a child element 
>     <compilerarg value="+Z" implementation="jikes" /> 
>     in all my <javac> tasks.
> Solve the syntax for this and you have an acceptable syntax to declare
> the nested elements of scripted tasks.

We've talked about this for a while now. Mutant does support a user 
config which is an XML file. Let me have a think about that.


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

View raw message