pathelement - Exclude a folder or replace with fileset

986 views Asked by At

I want to include all files and folders in the following structure except META-INF.

  src/
     context/
        ...
     com/
        ....
     META-INF/
        ...
     file1
     file2

Currently, I am using:

<classpath>
   ...
   ...
   <pathelement path="./src"/>
</classpath>

This is working fine. But now, I need to exclude src/META-INF folder. Does classpath element have exclude tag? I did not find any, neither does pathelement tag.

Or I would like to convert this to fileset tag and include everything except META-INF folder. What is the sytax for this? I tried the following. But it does not seem to be correct.

 <fileset dir="./src" includes="**/**" excludes="META-INF"/>
1

There are 1 answers

0
M A On BEST ANSWER

Add a pattern to excludes. You also don't need includes; all files are included when omitted.

<fileset dir="./src" excludes="META-INF/**"/>