title: Maven: How do I exclude specific source files from javadoc?
body: <p>I need to exclude specific source files (NOT just packages) from Javadoc using Maven. The &lt;excludePackageNames&gt; setting will not work for me: it only allows you to exclude certain packages. There's a &lt;sourceFileExcludes&gt; setting that has basically no documentation in the way of usage examples. It just says:</p>
  
  <p>"sourceFileExcludes: exclude filters on the source files. These are ignored if you specify subpackages or subpackage excludes."</p>
  
  <p>So, basically, I need to ignore all Java files that start with Mock, and also all Java files in two packages. Since sourceFileExcludes are ignored if I specify excludePackageNames, I can't combine them. So I tried this:</p>
  
  <pre><code>&lt;sourceFileExcludes&gt;
      &lt;exclude&gt;net/my/packagename/mock&lt;/exclude&gt;
      &lt;exclude&gt;net/my/packagename/samples&lt;/exclude&gt;
      &lt;exclude&gt;**/Mock*.java&lt;/exclude&gt;
  &lt;/sourceFileExcludes&gt;
  </code></pre>
  
  <p>But it did not work. None of the intended files were excluded.</p>
  
  <p>Anybody know how to use sourceFileExcludes?</p>