ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Velagapudi, Murali" <murali.velagap...@citigroup.com>
Subject RE: ant script task examples
Date Fri, 01 Oct 2004 13:57:12 GMT

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
        	    
        	 }              
          } 
           
  ]]></script>
 </target>

thanks,
Murali

-----Original Message-----
From: Mark Lybarger [mailto:Mark.Lybarger@CBC-Companies.com]
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: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message