i solved my problem with something like: <target name="sub"> <echo id="theEcho"> processing: ${msg}</echo> </target>
<target name="sub2"> <script language="javascript"><![CDATA[ antcall = acdv.createTask("antcall"); antcall.setTarget("sub"); var param = antcall.createParam(); param.setName("msg"); param.setValue("test"); antcall.perform() ]]></script> </target> i found a good article on: http://www.javaranch.com/newsletter/200312/ScriptingAnt.html > -----Original Message----- > From: Mark Lybarger > Sent: Friday, October 01, 2004 10:34 AM > To: Ant Users List > Subject: RE: ant script task examples > > > Thanks for all the help thus far. One small issue left. > > > -----Original Message----- > > From: Velagapudi, Murali [mailto:[EMAIL PROTECTED] > > Sent: Friday, October 01, 2004 9:57 AM > > To: Ant Users List > > Subject: RE: ant script task examples > > > > > > > > Mark, > > > > Here is the some sample which is close to what you have > > asked ,have a look into this.hope will be use full to you > > <target name="listoffiles" > > > <script language="javascript"> > > <![CDATA[ > > importClass(java.lang.System); > > importClass(java.io.BufferedReader); > > importClass(java.io.FileReader); > > br=BufferedReader(new FileReader("file/dirname")); > > while ((str = br.readLine()) != null ) { > > if(str.endsWith(".java")) > > { > > System.out.prinltn("in if condition"); > > // you can call you task/logic in this part > > ,this is as good as your java program > > How can i call out to an target passing in a > property of the filename here? > > > > > > } > > } > > > > ]]></script> > > </target> > > > > thanks, > > Murali > > > > -----Original Message----- > > From: Mark Lybarger [mailto:[EMAIL PROTECTED] > > Sent: Friday, October 01, 2004 9:50 AM > > To: Ant Users List (E-mail) > > Subject: ant script task examples > > > > > > does anyone know where some examples of using the ant script > > task can be found? i'm looking to use a simple script which > > iterates over each file in a directory and calls another ant > > task passing in the filename. > > > > thanks! > > ~mark > > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]