Apache ant exclude a single file in fileset
<p>I have very less experience with Ant and I want to add all jar files from a folder except a single jar.
I tried following:</p>

<pre><code>&lt;fileset dir="..\abc\xyz"  includes="..\abc\xyz\*.jar" /&gt;
&lt;fileset dir="..\abc\xyz"  exclude="..\abc\xyz\Fubar.jar" /&gt;
</code></pre>

<p>It still added Fubar.jar.</p>

<p>I also tried </p>

<pre><code>&lt;fileset dir="..\abc\xyz"  includes="..\abc\xyz\*.jar" exclude="..\abc\xyz\Fubar.jar" /&gt;
</code></pre>

<p>Still added Fubar.jar.
I know this can be achieved by isolating Fubar.jar by adding remaining files like:</p>

<pre><code>&lt;fileset dir="..\abc\xyz"  include="..\abc\xyz\AAA.jar" /&gt;
&lt;fileset dir="..\abc\xyz"  include="..\abc\xyz\BBB.jar" /&gt;
.
.
.
Except Fubar.jar
</code></pre>

<p>But this doesn't look good and if number of files increase, the list will also increase though I am trying to exclude just a single file.</p>