ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From efe4itcc <>
Subject Fileset with "empty" patternset selects all files instead
Date Sun, 04 Oct 2009 10:26:07 GMT


Env: JDK 1.6.0, ANT 1.7.1

I spend some time figuring out a classpath dependancy problem in my build
file, and finally cornered the cause to the surprinsing file selection of
<fileset> when using the following syntax.

<patternset id="mypatternset">
<path id="path.main.compile">
  <fileset dir="${mydir}">
    <patternset refid="mypatternset"/>

The above syntax make "path.main.compile" contains all files under ${mydir}.
Is patternset applying an implicit <include name="**"/> ?
Is fileset discarding the patternset as it does not declare any pattern ?
Is that the intended behavior?

To fix the problem, I just have to be more specific in the patternset
definition, such as:
<patternset id="mypatternset">
   <exclude name="**"/>

This example might seem of no use :)
However I use this path reference to designate a project's dependancies to
other of our projects, and some projects are standalone, so I need an empty
patternset for them.


View this message in context:
Sent from the Ant - Users mailing list archive at

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

View raw message