ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Elizabeth Cooper <>
Subject Re: fileset question
Date Fri, 11 Oct 2002 01:43:52 GMT
Further explanation...

I have formed the set of java files from a <selector> using a <contains> to 
select particular files based on a special criteria. This is fine, and I 
use this fileset to feed a list of files into javac.

However, the source directory contains many more java files that I do not 
want to  compile, each of which has corresponding resources. I agree that 
if I could use all the resources in the directory this would not be a problem.

So, I still need a way to "match","map", or otherwise form a fileset which 
exactly corresponds to the *.java files in my original fileset. These 
resources are *.gif, *.properties that have a filename that starts with the 
same "*" of *.java.

At 02:02 PM 10/10/02, you wrote:
>Wouldn't it just be easier to form a fileset that excludes **/*.java 
>files?  I store resources beside Java code also, and just copy them all to 
>the classes directory where I'm building to when I compile.
>         Erik
>Elizabeth Cooper wrote:
>>Can someone point me to an example of how to do this ...
>>I have a fileset which I have formed from a <selector>
>>These are all java files (*.java).
>>I want to convert this to a file list of corresponding resource files; I 
>>want to designate a source directory (${source}), and use the root name 
>>of the java files in this source directory to create a new fileset of all 
>>resource files that match. For example, I have,, and 
>>; I need the new fileset to only contain, 
>>, Bean32.gif, Bean16.gif,, 
>>,, etc.
>>This is to use in a copy (to copy resources for a jar); assuming the id 
>>of this new fileset is "new.file.set"
>>I want to be able to do:
>><copy todir="${}>
>>    <fileset refid="new.file.set" />
>>To unsubscribe, e-mail:   <>
>>For additional commands, e-mail: <>
>To unsubscribe, e-mail:   <>
>For additional commands, e-mail: <>

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

View raw message