You cant.
JavaTasks vs. <scriptdef>
JavaConditions vs. --
But you could write the condition directly:
JavaTasks vs. <script>
JavaConditions vs. <scriptcondition>
Jan
<project default="hello">
<condition property="german">
<scriptcondition language="javascript">
self.setValue(
java.util.Locale.getDefault() == java.util.Locale.GERMANY
);
</scriptcondition>
</condition>
<target name="hello.de" if="german">
<echo>Guten Morgen</echo>
</target>
<target name="hello.en" unless="german">
<echo>Good morning</echo>
</target>
<target name="hello" depends="hello.de,hello.en"/>
</project>
>-----Ursprüngliche Nachricht-----
>Von: [email protected] [mailto:[email protected]]
>Gesendet: Montag, 12. Oktober 2009 11:51
>An: [email protected]
>Betreff: scriptcondition
>
>Hi,
>
>How can I write a scriptcondition macro?
>Eg.
>
><scriptdef name="myscriptcondition" language="beanshell">
>
></scriptdef>
>
><if>
> <myscriptcondition/>
> <then>
>
>Thanks
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]