ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mikael Petterson \(KI/EAB\)" <>
Subject RE: Exclude list of files with fileset
Date Fri, 16 Feb 2007 13:40:22 GMT

I need to exclude specific file names since these are clearcase elements
and cannot ( should not ) be removed. I don't want the error message to
show so I thought excluding them from the fileset would do it.

<target name="test:clean" depends="init" description="clean all build
   <echo message="cleaning test ..."/> 
   <delete quiet="false" failonerror="false">
    <fileset dir="${classes.dir}"/>
    <fileset dir="${out.instr.dir}"/>
    <fileset dir="${test.classes.dir}"/>
    <fileset dir="${coverage.dir}"/>
    <fileset dir="${test.reports.dir}"/>
    <fileset dir="${test.alarm.dir}">
     <!--<include name="**/*.java"/>-->
      <exclude name=",,,,SectorWithAlarmsTestVobEdition.j
    <fileset dir="${test.function.dir}">
     <include name="**/*.java"/>
     <!-- only vob objects -->
     <exclude name="**/manual/*"/>
    <fileset dir="${qrank.dir}"/>

Here is the output that I still get. How can I get rid of the

[delete] Unable to delete file ... 

It seems like the exclude does not work!

What am I missing out?



-----Original Message-----
From: Kevin Jackson [] 
Sent: den 16 februari 2007 10:24
To: Ant Users List
Subject: Re: Exclude list of files with fileset


> Is this the way to exclude the a list of files ( I have more names 
> that I need to exclude)? Shall I use ';' or the regular ',' ?

If you check the manual online :

You'll see that the the excludesfile is actually a text file of exclude
patterns (or filenames) to exclude from the fileset

You need to use something like :

<fileset dir="${dir}">
  <include name="**/*.java"/>
  <exclude name="**/,

but if you just want to exclude your test sources (so long as they
follow the pattern of being called *

<fileset dir="${dir}">
  <include name="**/*.java"/>
  <exclude name="**/*"/>

> <fileset dir="${dir}">
>      <include name="**/*.java"/>
>      <excludesfile
> name="**/;**/AlarmsDefinitionsConsistencyTest.ja
> va
> "
> </fileset>


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

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

View raw message