title: Using the Maven surefire plugin to include tests
body: <p>I am using Maven to build my project.  I currently split testing into different hierarchies:</p>
  
  <ul>
  <li>Unit tests -> <code>src/test/java/**/*Test.java</code></li>
  <li>Integration tests -> <code>src/test-integration/java/**/*Test.java</code></li>
  <li>External tests -> <code>src/test-external/java/**/*Test.java</code></li>
  </ul>
  
  <p>Here is my <code>maven-surefire-plugin</code> section:</p>
  
  <pre><code>&lt;plugin&gt;
      &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
      &lt;artifactId&gt;maven-surefire-plugin&lt;/artifactId&gt;
      &lt;version&gt;${maven-surefire-plugin.version}&lt;/version&gt;
      &lt;configuration&gt;
          &lt;includes&gt;
              &lt;include&gt;src/test/java/**/*Test.java&lt;/include&gt;
          &lt;/includes&gt;
      &lt;/configuration&gt;
  &lt;/plugin&gt;
  </code></pre>
  
  <p>The <code>&lt;include&gt;</code> directive above does not work.  No tests are executed when I run: <code>mvn clean test</code></p>
  
  <p>I tried <code>**/*Test.java</code> and it runs all the tests -- unit, integration, and external.  However, for the default test suite, I only want to run the unit tests.</p>
  
  <p>How can I make this work in Maven?</p>
  
  <p>Ref:</p>
  
  <pre><code>&lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
  &lt;artifactId&gt;maven-surefire-plugin&lt;/artifactId&gt;
  &lt;version&gt;2.14.1&lt;/version&gt;
  </code></pre>