ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Yusuf Goolamabbas <>
Subject Compositing include/exclude in fileset
Date Thu, 14 Dec 2000 08:14:47 GMT
Using Ant 1.2

Hi, I am trying to write a target named "clean" which deletes all
.class file in the specified directory. That directory contains .java
files, .xml files and .txt files. I thought the following would do the

<fileset dir=".">
<exclude name="*" />
<include name="*.class" />

This did not work, I have to specify all the exclusions individually

<target name="clean">
<fileset dir="${srcfile}" >
<patternset id="non.test.sources" >
<exclude name="*.xml" />
<exclude name="*.java" />
<include name="*.class" />

Is there a way to tell Ant to find the composite between excludes and
includes and use the resultant fileset for the target

Regards, Yusuf

Yusuf Goolamabbas

View raw message