title: NoClassDefFoundError: Tests fail during Maven test phase when SureFire forkCount is greater than 0
body: <p><strong>Issue</strong></p>
  
  <p>Java 9 / Java 10 Module Mode: Tests failing due to initializationError: <code>java.lang.NoClassDefFoundError: Could not initialize class org.springframework.test.context.junit4.SpringRunner</code> when SureFire <code>forkCount</code> > 0</p>
  
  <ul>
  <li>Spring Boot: 2.0.1.RELEASE</li>
  <li>Java: "10" 2018-03-20 (Vendor: Oracle Corporation)</li>
  <li>Maven: 3.5.3</li>
  <li>maven-compiler-plugin: 3.7.0</li>
  <li>maven-surefire-plugin: 2.21.0</li>
  <li>macOS: 10.12.6</li>
  </ul>
  
  <p><strong>Relevant stack trace</strong></p>
  
  <pre><code>[INFO] --- maven-surefire-plugin:2.21.0:test (default-test) @ turbo ---
  [INFO]
  [INFO] -------------------------------------------------------
  [INFO]  T E S T S
  [INFO] -------------------------------------------------------
  [INFO] Running com.axiom.turbo.UserControllerIntegrationTest
  [ERROR] Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.001 s &lt;&lt;&lt; FAILURE! - in com.axiom.turbo.UserControllerIntegrationTest
  [ERROR] initializationError(com.axiom.turbo.UserControllerIntegrationTest)  Time elapsed: 0.001 s  &lt;&lt;&lt; ERROR!
  java.lang.NoClassDefFoundError: Could not initialize class org.springframework.test.context.junit4.SpringRunner
      at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
      at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
      at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
      at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:488)
      at org.junit.internal.builders.AnnotatedBuilder.buildRunner(AnnotatedBuilder.java:104)
      at org.junit.internal.builders.AnnotatedBuilder.runnerForClass(AnnotatedBuilder.java:86)
      at org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:59)
      at org.junit.internal.builders.AllDefaultPossibilitiesBuilder.runnerForClass(AllDefaultPossibilitiesBuilder.java:26)
      at org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:59)
      at org.junit.internal.requests.ClassRequest.getRunner(ClassRequest.java:33)
      at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:362)
      at org.apache.maven.surefire.junit4.JUnit4Provider.executeWithRerun(JUnit4Provider.java:273)
      at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:238)
      at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:159)
      at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:379)
      at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:340)
      at org.apache.maven.surefire.booter.ForkedBooter.execute(ForkedBooter.java:125)
      at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:413)
  </code></pre>
  
  <p><strong>Relevant section of pom.xml</strong></p>
  
  <pre><code>    &lt;plugin&gt;
          &lt;artifactId&gt;maven-compiler-plugin&lt;/artifactId&gt;
          &lt;version&gt;3.7.0&lt;/version&gt;
          &lt;configuration&gt;
              &lt;release&gt;${java.version}&lt;/release&gt;
          &lt;/configuration&gt;
          &lt;dependencies&gt;
              &lt;dependency&gt;
                  &lt;groupId&gt;org.ow2.asm&lt;/groupId&gt;
                  &lt;artifactId&gt;asm&lt;/artifactId&gt;
                  &lt;version&gt;6.1.1&lt;/version&gt;
              &lt;/dependency&gt;
          &lt;/dependencies&gt;
      &lt;/plugin&gt;
  
      &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;2.21.0&lt;/version&gt;
          &lt;configuration&gt;
              &lt;forkCount&gt;1&lt;/forkCount&gt; &lt;!-- works if set to 0 --&gt;
          &lt;/configuration&gt;
          &lt;dependencies&gt;
              &lt;dependency&gt;
                  &lt;groupId&gt;org.ow2.asm&lt;/groupId&gt;
                  &lt;artifactId&gt;asm&lt;/artifactId&gt;
                  &lt;version&gt;6.1.1&lt;/version&gt;
              &lt;/dependency&gt;
          &lt;/dependencies&gt;
      &lt;/plugin&gt;
  </code></pre>
  
  <p>If the <code>forkCount</code> is 0 then the tests pass and the build succeeds. It appears that SureFire fails on forking the Java process. Is this a known issue?</p>