Sorry, should have looked better at the library dependencies. Needed bsf, logFactory, and js.jar. Thanks again!
________________________________ From: Eric Fetzer <elstonk...@yahoo.com> To: Ant Users List <user@ant.apache.org> Sent: Wed, December 30, 2009 9:49:38 AM Subject: Re: Call a Macrodef using a property? Thanks Antoine. I haven't used the script task before. I need a little help on setup though, do you have a link for me. I started by getting bsf.jar in my path. Once I got that out there, it asked for logFactory. I put that in my path, now it's asking for EvaluatorException. I'm guessing there's a simpler way to allow scripting in Ant. Thanks Again, Eric ________________________________ From: Antoine Levy Lambert <anto...@gmx.de> To: Ant Users List <user@ant.apache.org> Sent: Wed, December 30, 2009 9:01:57 AM Subject: Re: Call a Macrodef using a property? Hello Eric, you would have to embed a scripting language in ant to do this. Something like (untested) <script language="javascript"> <![CDATA[ macroname=project.getProperty("myProperty"); macrotask = project.createTask(macroname); macrotask.execute(); ]]> </script> Look at the corresponding page in the manual (under optional tasks, Script) and at the library dependencies. Regards, Antoine Eric Fetzer wrote: > Is there any way to call a macrodef with the name of the macrodef held in a > property? Like this (of course this doesn't work): > > <project default="main"> > <target name="main"> > <property name="myProperty" value="myMac"/> > <${myProperty}/> > </target> > <macrodef name="myMac"> > <sequential> > <echo message="I made it in"/> > </sequential> > </macrodef> > </project> > > > --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscr...@ant.apache.org For additional commands, e-mail: user-h...@ant.apache.org