title: Maven: excluding java files in compilation
body: <p>I have a folder of java sources which I wish to exclude from the compilation.</p>
  
  <p>My folder is under <code>qa/apitests/src/main/java/api/test/omi</code>.</p>
  
  <p>I added the following entry in the <code>pom.xml</code> under <code>qa/bamtests</code> but it didn't help. Is there an entry in addition I need to make?</p>
  
  <pre><code>   &lt;build&gt;
       &lt;resources&gt;
         &lt;resource&gt;
           &lt;directory&gt;src/main/java&lt;/directory&gt;
           &lt;includes&gt;
             &lt;include&gt;**/*.properties&lt;/include&gt;
             &lt;include&gt;**/*.xml&lt;/include&gt;
             &lt;include&gt;**/*.xsd&lt;/include&gt;
             &lt;include&gt;**/*.csv&lt;/include&gt;
           &lt;/includes&gt;
           &lt;excludes&gt;
  &lt;exclude&gt;src/main/java/api/test/omi&lt;/exclude&gt;
           &lt;/excludes&gt;
         &lt;/resource&gt;
  &lt;/build&gt;
  </code></pre>