title: JUnit4 and JUnit5 tests not running in IntelliJ
body: <p>I am trying to use JUnit4 and JUnit5 tests in the same project in IntelliJ IDEA 2017.1.5. Until now, all tests were based on JUnit4. I added the <code>jupiter</code>, <code>platform</code> and <code>vintage</code> dependencies to my pom.xml (including the <code>junit-platform-surefire-provider</code> and <code>junit-vintage-engine</code> for the surefire plugin). <strong>Now, neither my example test for JUnit4 nor the one for JUnit 5 are executed.</strong></p>
  
  <p>Instead, I get the following error:</p>
  
  <pre><code>Exception in thread "main" java.lang.NoSuchMethodError: org.junit.platform.commons.util.ReflectionUtils.getDefaultClassLoader()Ljava/lang/ClassLoader;
      at org.junit.platform.launcher.core.ServiceLoaderTestEngineRegistry.loadTestEngines(ServiceLoaderTestEngineRegistry.java:30)
      at org.junit.platform.launcher.core.LauncherFactory.create(LauncherFactory.java:53)
      at com.intellij.junit5.JUnit5IdeaTestRunner.createListeners(JUnit5IdeaTestRunner.java:39)
      at com.intellij.rt.execution.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:49)
      at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:242)
      at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:70)
  
  Process finished with exit code 1
  Empty test suite.
  </code></pre>
  
  <p>I tried to follow the advice from the <a href="http://junit.org/junit5/docs/current/user-guide/" rel="noreferrer">JUnit 5 User Guide</a> as closely as possible but I probably missed something. <strong>How can I get both tests to run properly?</strong> (and all my existing tests, of course)</p>
  
  <h2>JUnit 4 Test Class</h2>
  
  <pre><code>package com.glaed.util;
  
  import org.junit.Test;
  
  public class JUnit4Test {
  
    @Test
    public void helloJUnit4Test() {
      System.out.println("Hello JUnit4!");
    }
  
  }
  </code></pre>
  
  <h2>JUnit 5 Test Class</h2>
  
  <pre><code>package com.glaed.util;
  
  import org.junit.jupiter.api.Test;
  
  class JUnit5Test {
  
    @Test
    void helloJU5test() {
      System.out.println("Hello JUnit5!");
    }
  }
  </code></pre>
  
  <h2>pom.xml (relevant parts)</h2>
  
  <pre><code>    &lt;build&gt;
      &lt;pluginManagement&gt;
          &lt;plugins&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.19.1&lt;/version&gt;
                  &lt;configuration&gt;
                      &lt;testSourceDirectory&gt;src/test&lt;/testSourceDirectory&gt;
                      &lt;excludes&gt;
                          &lt;exclude&gt;**/*WebappTest.java&lt;/exclude&gt;
                      &lt;/excludes&gt;
                  &lt;/configuration&gt;
                  &lt;dependencies&gt;
                      &lt;dependency&gt;
                          &lt;groupId&gt;org.junit.platform&lt;/groupId&gt;
                          &lt;artifactId&gt;junit-platform-surefire-provider&lt;/artifactId&gt;
                          &lt;version&gt;1.0.0-M5&lt;/version&gt;
                      &lt;/dependency&gt;
                      &lt;dependency&gt;
                          &lt;groupId&gt;org.junit.jupiter&lt;/groupId&gt;
                          &lt;artifactId&gt;junit-jupiter-engine&lt;/artifactId&gt;
                          &lt;version&gt;5.0.0-M5&lt;/version&gt;
                      &lt;/dependency&gt;
                      &lt;dependency&gt;
                          &lt;groupId&gt;org.junit.vintage&lt;/groupId&gt;
                          &lt;artifactId&gt;junit-vintage-engine&lt;/artifactId&gt;
                          &lt;version&gt;4.12.0-M5&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-compiler-plugin&lt;/artifactId&gt;
                  &lt;version&gt;3.5.1&lt;/version&gt;
                  &lt;configuration&gt;
                      &lt;source&gt;1.8&lt;/source&gt;
                      &lt;target&gt;1.8&lt;/target&gt;
                      &lt;encoding&gt;UTF-8&lt;/encoding&gt;
                  &lt;/configuration&gt;
              &lt;/plugin&gt;
          &lt;/plugins&gt;
      &lt;/pluginManagement&gt;
  &lt;/build&gt;
  
  &lt;dependencies&gt;
  
      &lt;!-- JUNIT5 &amp; JUPITER --&gt;
  
      &lt;!-- https://mvnrepository.com/artifact/org.junit.jupiter/junit-jupiter-engine --&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.junit.jupiter&lt;/groupId&gt;
          &lt;artifactId&gt;junit-jupiter-engine&lt;/artifactId&gt;
          &lt;version&gt;5.0.0-M5&lt;/version&gt;
          &lt;scope&gt;test&lt;/scope&gt;
      &lt;/dependency&gt;
  
      &lt;!-- https://mvnrepository.com/artifact/org.junit.jupiter/junit-jupiter-api --&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.junit.jupiter&lt;/groupId&gt;
          &lt;artifactId&gt;junit-jupiter-api&lt;/artifactId&gt;
          &lt;version&gt;5.0.0-M5&lt;/version&gt;
          &lt;scope&gt;test&lt;/scope&gt;
      &lt;/dependency&gt;
  
      &lt;dependency&gt;
          &lt;groupId&gt;org.junit.vintage&lt;/groupId&gt;
          &lt;artifactId&gt;junit-vintage-engine&lt;/artifactId&gt;
          &lt;version&gt;4.12.0-M5&lt;/version&gt;
          &lt;scope&gt;test&lt;/scope&gt;
      &lt;/dependency&gt;
  
      &lt;!-- JUnit 4 --&gt;
  
      &lt;dependency&gt;
          &lt;groupId&gt;junit&lt;/groupId&gt;
          &lt;artifactId&gt;junit&lt;/artifactId&gt;
          &lt;version&gt;4.12&lt;/version&gt;
          &lt;scope&gt;test&lt;/scope&gt;
      &lt;/dependency&gt;
  
  &lt;/dependencies&gt;
  </code></pre>