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: ext-simon.stei...@nokia.com [mailto:ext-simon.stei...@nokia.com] >Gesendet: Montag, 12. Oktober 2009 11:51 >An: user@ant.apache.org >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: user-unsubscr...@ant.apache.org For additional commands, e-mail: user-h...@ant.apache.org