ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kevin Jackson" <foamd...@gmail.com>
Subject Re: Exclude list of files with fileset
Date Fri, 16 Feb 2007 09:24:08 GMT
Hi,

> 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 :

http://ant.apache.org/manual/CoreTypes/fileset.html

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="**/AlarmListInfoTest.java,
**/AlarmsDefinitionsConsistencyTest.java"/>
</fileset>

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

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

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

Thanks,
Kev

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


Mime
View raw message