title: maven surefire-junit47 is not running JUnit4 tests
body: <p>In a maven project with lots of JUnit 4 tests, surefire-junit47 is not executing the tests.</p>
  
  <p>There are no testng tests in this project, and there is no testng in the pom.  But this project has a dependency on another project that does have testng in the pom.  You can see it import testng in the mvn -X output below.</p>
  
  <p>For reference sake, here is the documentation I'm working from:
  <a href="https://maven.apache.org/surefire/maven-surefire-plugin/examples/inclusion-exclusion.html" rel="nofollow noreferrer">https://maven.apache.org/surefire/maven-surefire-plugin/examples/inclusion-exclusion.html</a></p>
  
  <p>Here are a couple of pom configurations that show the problem. </p>
  
  <p>Given this test class organization:</p>
  
  <pre><code>- src/main/test/
     - com.mycomp.qc.core.account
       - CopyAccountTests.java
       - CreateAccountTests.java
       - DeleteAccountTests.java
       - ListAccountTests.java
       - ReadAccountTests.java
       - UpdateAccountTests.java
     - com.mycomp.qc.core.product
       - CopyProductTests.java
       - CreateProductTests.java
       - DeleteProductTests.java
       - ListProductTests.java
       - ReadProductTests.java
       - UpdateProductTests.java
     - ..... and 300 more packages .....
  </code></pre>
  
  <p>And given this test class structure:</p>
  
  <pre class="lang-java prettyprint-override"><code>package com.mycomp.qc.core.account;
  
  import org.junit.Assert;
  import org.junit.Test;
  .... and more ....
  
  public class CopyAccountTests {
  
      @Test
      public void copyAccount1() {
          Assert.assertTrue("pass", true);
      }
  
      @Test
      public void copyAccount2() {
          Assert.assertTrue("fail", false);
      }
  
  .... and more ....
  
  }
  </code></pre>
  
  <p><strong>pom config 1: Specifically include Account tests, by pattern</strong> </p>
  
  <p>Runs all the Account tests, just as the documentation indicates.</p>
  
  <pre class="lang-xml prettyprint-override"><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;${surefire.version}&lt;/version&gt;
      &lt;dependencies&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.apache.maven.surefire&lt;/groupId&gt;
              &lt;artifactId&gt;surefire-junit47&lt;/artifactId&gt;
              &lt;version&gt;${surefire.version}&lt;/version&gt;
          &lt;/dependency&gt;
      &lt;/dependencies&gt;
      &lt;configuration&gt;
          &lt;testFailureIgnore&gt;true&lt;/testFailureIgnore&gt;
          &lt;includes&gt;
              &lt;include&gt;*Account*&lt;/include&gt;
          &lt;/includes&gt;
          &lt;threadCount&gt;1&lt;/threadCount&gt;
      &lt;/configuration&gt;
      &lt;executions&gt;
          &lt;execution&gt;
              &lt;id&gt;default-test&lt;/id&gt;
              &lt;phase&gt;test&lt;/phase&gt;
              &lt;goals&gt;
                  &lt;goal&gt;test&lt;/goal&gt;
              &lt;/goals&gt;
          &lt;/execution&gt;
      &lt;/executions&gt;
  &lt;/plugin&gt;
  </code></pre>
  
  <p><strong>pom config 2: Specifically include Account tests, by pattern</strong> </p>
  
  <p>Runs all the Account and Product tests, just as the documentation indicates.</p>
  
  <pre class="lang-xml prettyprint-override"><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;${surefire.version}&lt;/version&gt;
      &lt;dependencies&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.apache.maven.surefire&lt;/groupId&gt;
              &lt;artifactId&gt;surefire-junit47&lt;/artifactId&gt;
              &lt;version&gt;${surefire.version}&lt;/version&gt;
          &lt;/dependency&gt;
      &lt;/dependencies&gt;
      &lt;configuration&gt;
          &lt;testFailureIgnore&gt;true&lt;/testFailureIgnore&gt;
          &lt;includes&gt;
              &lt;include&gt;*Account*&lt;/include&gt;
              &lt;include&gt;*Product*&lt;/include&gt;
          &lt;/includes&gt;
          &lt;threadCount&gt;1&lt;/threadCount&gt;
      &lt;/configuration&gt;
      &lt;executions&gt;
          &lt;execution&gt;
              &lt;id&gt;default-test&lt;/id&gt;
              &lt;phase&gt;test&lt;/phase&gt;
              &lt;goals&gt;
                  &lt;goal&gt;test&lt;/goal&gt;
              &lt;/goals&gt;
          &lt;/execution&gt;
      &lt;/executions&gt;
  &lt;/plugin&gt;
  </code></pre>
  
  <p><strong>pom config 3: Include all tests, based on default surefire</strong></p>
  
  <p>Finds and initializes test classes, but does not execute any @Test methods.</p>
  
  <pre class="lang-xml prettyprint-override"><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;${surefire.version}&lt;/version&gt;
      &lt;dependencies&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.apache.maven.surefire&lt;/groupId&gt;
              &lt;artifactId&gt;surefire-junit47&lt;/artifactId&gt;
              &lt;version&gt;${surefire.version}&lt;/version&gt;
          &lt;/dependency&gt;
      &lt;/dependencies&gt;
      &lt;configuration&gt;
          &lt;testFailureIgnore&gt;true&lt;/testFailureIgnore&gt;
          &lt;threadCount&gt;1&lt;/threadCount&gt;
      &lt;/configuration&gt;
      &lt;executions&gt;
          &lt;execution&gt;
              &lt;id&gt;default-test&lt;/id&gt;
              &lt;phase&gt;test&lt;/phase&gt;
              &lt;goals&gt;
                  &lt;goal&gt;test&lt;/goal&gt;
              &lt;/goals&gt;
          &lt;/execution&gt;
      &lt;/executions&gt;
  &lt;/plugin&gt;
  </code></pre>
  
  <p><strong>pom config 4: Include all tests, by pattern</strong></p>
  
  <p>Finds and initializes test classes, but does not execute any @Test methods.</p>
  
  <pre class="lang-xml prettyprint-override"><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;${surefire.version}&lt;/version&gt;
      &lt;dependencies&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.apache.maven.surefire&lt;/groupId&gt;
              &lt;artifactId&gt;surefire-junit47&lt;/artifactId&gt;
              &lt;version&gt;${surefire.version}&lt;/version&gt;
          &lt;/dependency&gt;
      &lt;/dependencies&gt;
      &lt;configuration&gt;
          &lt;testFailureIgnore&gt;true&lt;/testFailureIgnore&gt;
          &lt;includes&gt;
              &lt;include&gt;*Test*&lt;/include&gt;
          &lt;/includes&gt;
          &lt;threadCount&gt;1&lt;/threadCount&gt;
      &lt;/configuration&gt;
      &lt;executions&gt;
          &lt;execution&gt;
              &lt;id&gt;default-test&lt;/id&gt;
              &lt;phase&gt;test&lt;/phase&gt;
              &lt;goals&gt;
                  &lt;goal&gt;test&lt;/goal&gt;
              &lt;/goals&gt;
          &lt;/execution&gt;
      &lt;/executions&gt;
  &lt;/plugin&gt;
  </code></pre>
  
  <p><strong>What I've tried:</strong></p>
  
  <ol>
  <li><p>Obviously, from the examples, I've tried different include patterns in the pom.  See the results outlined above.</p></li>
  <li><p>Configured a new project, with all the same imports and just a few small tests.  All the include patterns above behaved as outlined in the documentation.</p></li>
  <li><p>Switched the surefire provider to surefire-junit4. This, in fact, executed all tests, but we ran into other problems.</p></li>
  <li><p>Ran mvn -X, mainly to look for testng problems, based on this answer: <a href="https://stackoverflow.com/questions/2021771/surefire-is-not-picking-up-junit-4-tests">Surefire is not picking up Junit 4 tests</a>.</p></li>
  <li><p>mvn -X showed that the default maven-resources-plugin pulls in junit 3.8.x, which the doc says might cause problems.  Updated resources to 3.1.0, but it didn't fix my problem.</p></li>
  </ol>
  
  <p><strong>mnv -X output</strong></p>
  
  <p>Is way too big to include.  If you want part of it, please ask.</p>