title: Intellij does not run Junit5 tests
body: <p>This is a related question to <a href="https://stackoverflow.com/questions/47830325/maven-surefire-plugin-does-not-detect-junit5-tests">Maven surefire plugin does not detect Junit5 tests</a> and I have read the <a href="http://junit.org/junit5/docs/current/user-guide/#running-tests-ide" rel="nofollow noreferrer">userguide</a>.</p>
  
  <p>I have the following in my pom.xml and when I run the maven install the test gets run. </p>
  
  <pre><code>&lt;properties&gt;
      &lt;maven.compiler.target&gt;1.8&lt;/maven.compiler.target&gt;
      &lt;maven.compiler.source&gt;1.8&lt;/maven.compiler.source&gt;
      &lt;project.build.sourceEncoding&gt;UTF-8&lt;/project.build.sourceEncoding&gt;
      &lt;junit.platform.version&gt;1.0.1&lt;/junit.platform.version&gt;
      &lt;junit.jupiter.version&gt;5.0.2&lt;/junit.jupiter.version&gt;
      &lt;junit.vintage.version&gt;4.12.2&lt;/junit.vintage.version&gt;
  &lt;/properties&gt;
  
  &lt;dependencies&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;com.google.guava&lt;/groupId&gt;
          &lt;artifactId&gt;guava&lt;/artifactId&gt;
          &lt;version&gt;23.0&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.apache.commons&lt;/groupId&gt;
          &lt;artifactId&gt;commons-lang3&lt;/artifactId&gt;
          &lt;version&gt;3.7&lt;/version&gt;
          &lt;scope&gt;test&lt;/scope&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;commons-io&lt;/groupId&gt;
          &lt;artifactId&gt;commons-io&lt;/artifactId&gt;
          &lt;version&gt;2.6&lt;/version&gt;
          &lt;scope&gt;test&lt;/scope&gt;
      &lt;/dependency&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;${junit.jupiter.version}&lt;/version&gt;
          &lt;scope&gt;test&lt;/scope&gt;
      &lt;/dependency&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.2&lt;/version&gt;
          &lt;scope&gt;test&lt;/scope&gt;
      &lt;/dependency&gt;
      &lt;!-- Only required to run tests in an IDE that bundles an older version --&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.junit.platform&lt;/groupId&gt;
          &lt;artifactId&gt;junit-platform-launcher&lt;/artifactId&gt;
          &lt;version&gt;${junit.platform.version}&lt;/version&gt;
          &lt;scope&gt;test&lt;/scope&gt;
      &lt;/dependency&gt;
      &lt;!-- Only required to run tests in an IDE that bundles an older version --&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;${junit.jupiter.version}&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;${junit.vintage.version}&lt;/version&gt;
          &lt;scope&gt;test&lt;/scope&gt;
      &lt;/dependency&gt;
  &lt;/dependencies&gt;
  
  &lt;build&gt;
      &lt;plugins&gt;
          &lt;plugin&gt;
              &lt;artifactId&gt;maven-surefire-plugin&lt;/artifactId&gt;
              &lt;version&gt;2.19&lt;/version&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;${junit.platform.version}&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;${junit.jupiter.version}&lt;/version&gt;
                  &lt;/dependency&gt;
              &lt;/dependencies&gt;
          &lt;/plugin&gt;
      &lt;/plugins&gt;
  &lt;/build&gt;
  </code></pre>
  
  <p>However when I run with Intellij IDEA 2017.1.5 the unit tests throw the following exception</p>
  
  <pre><code>Exception in thread "main" java.lang.NoSuchMethodError: org.junit.platform.launcher.Launcher.execute(Lorg/junit/platform/launcher/LauncherDiscoveryRequest;)V
  at com.intellij.junit5.JUnit5IdeaTestRunner.startRunnerWithArgs(JUnit5IdeaTestRunner.java:61)
  at com.intellij.rt.execution.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:51)
  at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:242)
  at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:70)
  </code></pre>
  
  <p>Unfortunately upgrading Intellij itself is going to take me slightly longer to achieve in an enterprise environment so is there any way to make this work in Intellij 2017.1.5 so that it runs the tests? </p>
  
  <p>FYI the test I am attempting to run is NOT a vintage test it is a simple Junit5 test with the org.junit.jupiter.api.Test annotation</p>