title: ant fileset dir exclude certain directory
body: <p>There are many questions on this topic but none of the answers are solving my problem. Starting this thread again to get fresh input. </p>
  
  <p>I tried two different approaches for excluding B-dir and all its contents under A-dir/subdir. But none work. FYI, a-dir is under dir.src
  1)</p>
  
  <pre><code>  &lt;copy todir="${dir.classes}" excludes="A-dir/**/B-dir/**"&gt;
    &lt;fileset dir="${dir.src}" &gt;
      &lt;exclude name="**/*.java"/&gt;
    &lt;/fileset&gt;
    &lt;/copy&gt;
  </code></pre>
  
  <p>2)</p>
  
  <pre><code>  &lt;copy todir="${dir.classes}"&gt;
    &lt;fileset dir="${dir.src}" &gt;
      &lt;exclude name="**/*.java"/&gt;
      &lt;exclude name="A-dir/**/B-dir/**"/&gt;
    &lt;/fileset&gt;
    &lt;/copy&gt;
  </code></pre>
  
  <p>I tried deleting all old jars and do a clean compile like someone suggested. But that doesn't help either.</p>