title: Intellij - Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.22.2:test (default-test) on project *** : There are test failures
body: <p>I have a java maven project where i am using JUnit Juniper for my unit test , while building the project i am getting below error where as if i build the same project from my local it works perfectly fine.  </p>
  
  <p>Is this an issue with Intellij ?  </p>
  
  <p><strong>I am facing below issue while building my maven project in Intellij whereas this issue doesn't come up when i build from local.</strong>  </p>
  
  <ul>
  <li>Intellij 2019.1.1  </li>
  <li>Maven version # 3.3.9  </li>
  <li>JDK #1.8</li>
  </ul>
  
  <p><strong>Error</strong></p>
  
  <pre><code>Error Messages # [ERROR] The forked VM terminated without properly saying goodbye. VM crash or System.exit called?
  
  [ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.22.2:test (default-test) on project ImplementJunit: There are test failures.
  [ERROR] Please refer to dump files (if any exist) [date].dump, [date]-jvmRun[N].dump and [date].dumpstream.
  [ERROR] The forked VM terminated without properly saying goodbye. VM crash or System.exit called?
  [ERROR] Command was cmd.exe /X /C ""C:\Program Files\Java\jdk1.8.0_221\jre\bin\java" -jar C:\Users\mnayak6\AppData\Local\Temp\surefire2741322585113384847\surefirebooter6121148917405790398.jar C:\Users\mnayak6\AppData\Local\Temp\surefire2741322585113384847 2020-04-23T15-08-00_156-jvmRun1 surefire3485996048802854818tmp surefire_08080424484537241935tmp"
  [ERROR] Process Exit Code: 0
  [ERROR] org.apache.maven.surefire.booter.SurefireBooterForkException: The forked VM terminated without properly saying goodbye. VM crash or System.exit called?
  [ERROR] Command was cmd.exe /X /C ""C:\Program Files\Java\jdk1.8.0_221\jre\bin\java" -jar C:\Users\mnayak6\AppData\Local\Temp\surefire2741322585113384847\surefirebooter6121148917405790398.jar C:\Users\mnayak6\AppData\Local\Temp\surefire2741322585113384847 2020-04-23T15-08-00_156-jvmRun1 surefire3485996048802854818tmp surefire_08080424484537241935tmp"
  [ERROR] Process Exit Code: 0
  [ERROR] at org.apache.maven.plugin.surefire.booterclient.ForkStarter.fork(ForkStarter.java:669)
  [ERROR] at org.apache.maven.plugin.surefire.booterclient.ForkStarter.run(ForkStarter.java:282)
  [ERROR] at org.apache.maven.plugin.surefire.booterclient.ForkStarter.run(ForkStarter.java:245)
  [ERROR] at org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeProvider(AbstractSurefireMojo.java:1183)
  [ERROR] at org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeAfterPreconditionsChecked(AbstractSurefireMojo.java:1011)
  [ERROR] at org.apache.maven.plugin.surefire.AbstractSurefireMojo.execute(AbstractSurefireMojo.java:857)
  [ERROR] at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
  [ERROR] at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:207)
  [ERROR] at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
  [ERROR] at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
  [ERROR] at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
  [ERROR] at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
  [ERROR] at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
  [ERROR] at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
  [ERROR] at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307)
  [ERROR] at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)
  [ERROR] at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)
  [ERROR] at org.apache.maven.cli.MavenCli.execute(MavenCli.java:863)
  [ERROR] at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288)
  [ERROR] at org.apache.maven.cli.MavenCli.main(MavenCli.java:199)
  [ERROR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  [ERROR] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
  [ERROR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
  [ERROR] at java.lang.reflect.Method.invoke(Method.java:498)
  [ERROR] at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
  [ERROR] at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
  [ERROR] at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
  [ERROR] at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
  [ERROR] at org.codehaus.classworlds.Launcher.main(Launcher.java:47)
  
  </code></pre>
  
  <p><strong>POM.XML</strong></p>
  
  <pre><code>&lt;properties&gt;
          &lt;!-- https://maven.apache.org/general.html#encoding-warning --&gt;
          &lt;project.build.sourceEncoding&gt;UTF-8&lt;/project.build.sourceEncoding&gt;
          &lt;maven.compiler.source&gt;1.8&lt;/maven.compiler.source&gt;
          &lt;maven.compiler.target&gt;1.8&lt;/maven.compiler.target&gt;
      &lt;/properties&gt;
  
      &lt;dependencies&gt;
              &lt;!-- ... --&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.4.0 &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-engine&lt;/artifactId&gt;
                  &lt;version&gt;5.4.0&lt;/version&gt;
                  &lt;scope&gt;test&lt;/scope&gt;
              &lt;/dependency&gt;
              &lt;!-- ... --&gt;
  
          &lt;!-- ... --&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.2.0&lt;/version&gt;
          &lt;/dependency&gt;
  
      &lt;/dependencies&gt;
  
      &lt;build&gt;
  
          &lt;plugins&gt;
          &lt;plugin&gt;
              &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
              &lt;artifactId&gt;maven-compiler-plugin&lt;/artifactId&gt;
              &lt;executions&gt;
                  &lt;execution&gt;
                      &lt;id&gt;test-compile&lt;/id&gt;
                      &lt;goals&gt;
                          &lt;goal&gt;testCompile&lt;/goal&gt;
                      &lt;/goals&gt;
                  &lt;/execution&gt;
              &lt;/executions&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.22.2&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;1.2.0&lt;/version&gt;
                      &lt;/dependency&gt;
                  &lt;/dependencies&gt;
              &lt;/plugin&gt;
  
          &lt;/plugins&gt;
  
      &lt;/build&gt;
  </code></pre>
  
  <p>Test Class:</p>
  
  <pre><code>@Test
  public void testGetMidDate()
  {
      ImplementJunit implementJunit = new ImplementJunit();
  
      System.out.println("calling testGetMidDate() ");
  
      String date = implementJunit.getMidDate("20200101", "20200103");
  
      String ExpectedDate = "20200102";
      assertEquals(ExpectedDate,date);
  }
  </code></pre>