ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tim Vernum <>
Subject RE: ScriptDef
Date Wed, 13 Feb 2002 04:55:07 GMT
From: Conor MacNeill []

> I have prototyped a new task in mutant which I'd like to get feedback 
> from anyone interested. 

Concept +1
Syntax +0

>    <scriptdef name="scripttest" language="javascript"> <![CDATA[
>    var test = "hello";
>    function setTest(x) {
>       test = x;
>    }
>    function execute()
>    {
>      java.lang.System.out.println("test is " + test);
>      modelElementClass = 
> context.getModelElement().getClass().getName();
>      java.lang.System.out.println("model element class is " + 
> modelElementClass);
>    }
>      ]]> </scriptdef>

I'm not sure yet whether it makes sense to have the scripts need
to follow the same naming conventions as java tasks.

It might (or might not) make more sense to have something like
(excuse my lack of javascript knowledge)

function attributes() {
	return ({ "test" });

rather than needing to have setXXX methods for everything.

I like the idea (and have pondered a few times how to fit it
into Ant1.x), but I think some discussion of the syntax for
task-scripts is in order.

This e-mail and any attachments are confidential and may contain copyright material of Macquarie
Bank or third parties. If you are not the intended recipient of this email you should not
read, print, re-transmit, store or act in reliance on this e-mail or any attachments, and
should destroy all copies of them. Macquarie Bank does not guarantee the integrity of any
emails or any attached files. The views or opinions expressed are the author's own and may
not reflect the views or opinions of Macquarie Bank. 

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

View raw message