ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Maarten Coene <Maarten.Co...@cs.kuleuven.ac.be>
Subject Re: Help needed with FileSet
Date Tue, 04 Jun 2002 06:10:34 GMT

>I can't see that you're doing anything wrong, since I ran what you posted,
>and it worked fine for me -- the .java files that I created a
>corresponding .form file for don't show up in the fileset.

Hi Diane,

Thanks a lot for your time :-) I tried it again with a simple example (all 
files in the same directory) and it worked. But, if I try it with a more 
"complex" directory structure, it fails.
The example below fails for me: all the files are in the fileset...

Suppose you have the following directory-structure:

anttest/
     build/
         build.xml
     src/
         mypackage/
             MyClass1.java
             MyClass2.java
             MyClass2.form
     target/

If I execute the following build-file (build.xml):

<project name="Test" basedir=".." default="test">

     <target name="test">
         <copy todir="target" filtering="no">
             <fileset dir="src" includes="**/*.java">
                 <not>
                     <presentselect targetdir="src">
                         <mapper type="glob" from="*.java" to="*.form" />
                     </presentselect>
                 </not>
             </fileset>
         </copy>
     </target>

</project>

I get this at the command-prompt (using Windows 2000):

C:\test\anttest\build>ant test
Buildfile: build.xml

test:
      [copy] Copying 2 files to C:\test\anttest\target

BUILD SUCCESSFUL
Total time: 2 seconds

So, all the .java files are copied :-(

Maarten

--
Maarten Coene
Katholieke Universiteit Leuven
Dept. Computerwetenschappen             Tel: ++32 (0)16/32 78 25
Celestijnenlaan 200A
B-3001 Heverlee


--
To unsubscribe, e-mail:   <mailto:ant-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>


Mime
View raw message