ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Manjunath Rane <>
Subject RE: echo and filesets
Date Mon, 13 Jan 2003 07:44:28 GMT
sure, i would like it...please do forward the same

Manjunath Rane

-----Original Message-----
From: []
Sent: Monday, January 13, 2003 1:50 PM
Subject: RE: echo and filesets


I wrote a task that takes a fileset and calls any ant target for each file
in the fileset. It passes several formats of the currently processed
filename in properties:

foreach.file--a full filename from the defined fileset,
foreach.dir--the directory of the file, name of the file, without path but with extension, name of the file, without path and without extension


 <target name="foo">
     <fileset dir="${server.src}" casesensitive="yes">
       <include name="**/*.java"/>
       <exclude name="**/*Test*"/>
     <antcall target="bar">
       <param name="property1" value="aaaaa" />
       <param name="foo" value="bar" />

 <target name="bar" depends="init">
   <echo message="prop is ${property1} ${foo}" />
   <echo message="foreach.file is ${foreach.file}" />
   <echo message="foreach.dir is ${foreach.dir}" />
   <echo message=" is ${}" />
   <echo message=" is ${}" />

It is based on the core <delete> task.

Are you interested in it? Is there anyone else interested? (Wouldn't mind to
have it included in the Ant's distribution ;-))

> -----Original Message-----
> From: Inger, Matthew []
> Sent: Friday, January 10, 2003 8:25 PM
> To: ''
> Subject: echo and filesets
> Would it be possible (i would even be willing to write the code) to
> extend the echo task so that it could take a fileset argument?  And
> it would either echo the fileset to the standard output area, or to
> the file specified in the command?
> ie.
> <fileset id="myFs" dir="src" includes="**/*.java" />
> <echo file="fileList.txt">
>   <fileset refid="myFs" />
> </echo>
> Reason i ask is that right now, we are using the exec command
> and specifying an output file for a "cmd.exe /c dir /s /b
> *.java" command to
> get the filelist.  I'd rather do it in a more os independent manner.
> Once we have the file, we're passing the filename to the <ajc>
> (aspect java compiler) for processing.  It uses the contents of
> this file to actually build the project (it needs all java file names
> to completely aspect and produce appropriate class files).
>  for more info on aspectj

This e-mail and any attachment is for authorised use by the intended
recipient(s) only.  It may contain proprietary material, confidential
information and/or be subject to legal privilege.  It should not be copied,
disclosed to, retained or used by, any other party.  If you are not an
intended recipient then please promptly delete this e-mail and any
attachment and all copies and inform the sender.  Thank you.

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message