it-swarm.com.de

Maven Build und Maven-Fail-Safe-Plugin - Das Gegenteil VM ohne ordentlich Abschied zu beenden

Ich verwende Docker und https://github.com/fabric8io/docker-maven-plugin für meine Integrationstests.

Auf meinem Windows 10-Computer (nach dem Update auf Windows 10 1709) trat der folgende Fehler mit meinem Maven 3.5.0-Build auf:

[ERROR] Failed to execute goal org.Apache.maven.plugins:maven-failsafe-plugin:2.20.1:verify (default) on project api: There are test failures.
[ERROR]
[ERROR] Please refer to D:\Projects\example\api\target\failsafe-reports for the individual test results.
[ERROR] Please refer to dump files (if any exist) [date]-jvmRun[N].dump, [date].dumpstream and [date]-jvmRun[N].dumpstream.
[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:\Java\jdk1.8.0_152\jre\bin\Java -jar C:\Users\ALEXAN~1\AppData\Local\Temp\surefire1232565117555778729\surefirebooter3745527118196863348.jar C:\Users\Alexander\AppData\Local\Temp\surefire1232565117555778729 2017-10-19T16-45-23_780-jvmRun1 surefire4633356271541422594tmp surefire_169922891955689988tmp"
[ERROR] Error occurred in starting fork, check output in log
[ERROR] Process Exit Code: 1
[ERROR] Crashed tests:
[ERROR] com.example.domain.api.flag.FlagControllerIT
[ERROR]         at org.Apache.maven.plugin.surefire.booterclient.ForkStarter.fork(ForkStarter.Java:686)
[ERROR]         at org.Apache.maven.plugin.surefire.booterclient.ForkStarter.fork(ForkStarter.Java:535)
[ERROR]         at org.Apache.maven.plugin.surefire.booterclient.ForkStarter.run(ForkStarter.Java:280)
[ERROR]         at org.Apache.maven.plugin.surefire.booterclient.ForkStarter.run(ForkStarter.Java:245)
[ERROR]         at org.Apache.maven.plugin.surefire.AbstractSurefireMojo.executeProvider(AbstractSurefireMojo.Java:1124)
[ERROR]         at org.Apache.maven.plugin.surefire.AbstractSurefireMojo.executeAfterPreconditionsChecked(AbstractSurefireMojo.Java:954)
[ERROR]         at org.Apache.maven.plugin.surefire.AbstractSurefireMojo.execute(AbstractSurefireMojo.Java:832)
[ERROR]         at org.Apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.Java:134)
[ERROR]         at org.Apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.Java:208)
[ERROR]         at org.Apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.Java:154)
[ERROR]         at org.Apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.Java:146)
[ERROR]         at org.Apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.Java:117)
[ERROR]         at org.Apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.Java:81)
[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:309)
[ERROR]         at org.Apache.maven.DefaultMaven.doExecute(DefaultMaven.Java:194)
[ERROR]         at org.Apache.maven.DefaultMaven.execute(DefaultMaven.Java:107)
[ERROR]         at org.Apache.maven.cli.MavenCli.execute(MavenCli.Java:993)
[ERROR]         at org.Apache.maven.cli.MavenCli.doMain(MavenCli.Java:345)
[ERROR]         at org.Apache.maven.cli.MavenCli.main(MavenCli.Java:191)
[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)

Im Moment habe ich keine Ahnung, was falsch sein kann, ich sehe keine Fehler bei meinen Tests.

Was kann ein Grund für dieses Problem sein und wie kann es gelöst werden?

AKTUALISIERTE

Mein Projekt hat folgende Konfiguration:

übergeordneter pom.xml:

<build>
 <plugins>
  <plugin>
   <artifactId>maven-surefire-plugin</artifactId>
    <configuration>
     <argLine>-Dfile.encoding=UTF-8 -Xms1024m -Xmx1024m -XX:PermSize=1024m -noverify</argLine>
    </configuration>
   </plugin>
  </plugins>
 </build>

untermodul pom.xml:

<profiles>
 <profile>
  <id>local</id>
  <build>
   <plugins>
    <plugin>
     <groupId>org.Apache.maven.plugins</groupId>
     <artifactId>maven-surefire-plugin</artifactId>
     <configuration>                            
      <skipTests>true</skipTests>
     </configuration>
    </plugin>
   </plugins>
  </build>
 </profile>
</profiles>

Wie Sie sehen können, fügte ich hinzu 

<argLine>-Dfile.encoding=UTF-8 -Xms1024m -Xmx1G -XX:PermSize=1024m -noverify</argLine>

an die Konfiguration von maven-surefire-plugin an meine Mutter pom.xml aber es hat nicht geholfen.

Dies wird für Maven Build mit -e und -X ausgegeben.

[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 01:58 min
[INFO] Finished at: 2017-10-19T22:27:40+03:00
[INFO] Final Memory: 62M/1117M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.Apache.maven.plugins:maven-failsafe-plugin:2.20.1:verify (default) on project domain: There are test failures.
[ERROR]
[ERROR] Please refer to D:\Projects\example\domain\target\failsafe-reports for the individual test results.
[ERROR] Please refer to dump files (if any exist) [date]-jvmRun[N].dump, [date].dumpstream and [date]-jvmRun[N].dumpstream.
[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:\Java\jdk1.8.0_152\jre\bin\Java -jar C:\Users\ALEXAN~1\AppData\Local\Temp\surefire7778309393610397922\surefirebooter4888497370312362560.jar C:\Users\Alexander\AppData\Local\Temp\surefire7778309393610397922 2017-10-19T22-26-15_682-jvmRun1 surefire8701817832311419883tmp surefire_01518784195718073645tmp"
[ERROR] Error occurred in starting fork, check output in log
[ERROR] Process Exit Code: 1
[ERROR] Crashed tests:
[ERROR] com.example.domain.DecisionCharacteristicIT
[ERROR]         at org.Apache.maven.plugin.surefire.booterclient.ForkStarter.fork(ForkStarter.Java:686)
[ERROR]         at org.Apache.maven.plugin.surefire.booterclient.ForkStarter.fork(ForkStarter.Java:535)
[ERROR]         at org.Apache.maven.plugin.surefire.booterclient.ForkStarter.run(ForkStarter.Java:280)
[ERROR]         at org.Apache.maven.plugin.surefire.booterclient.ForkStarter.run(ForkStarter.Java:245)
[ERROR]         at org.Apache.maven.plugin.surefire.AbstractSurefireMojo.executeProvider(AbstractSurefireMojo.Java:1124)
[ERROR]         at org.Apache.maven.plugin.surefire.AbstractSurefireMojo.executeAfterPreconditionsChecked(AbstractSurefireMojo.Java:954)
[ERROR]         at org.Apache.maven.plugin.surefire.AbstractSurefireMojo.execute(AbstractSurefireMojo.Java:832)
[ERROR]         at org.Apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.Java:134)
[ERROR]         at org.Apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.Java:208)
[ERROR]         at org.Apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.Java:154)
[ERROR]         at org.Apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.Java:146)
[ERROR]         at org.Apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.Java:117)
[ERROR]         at org.Apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.Java:81)
[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:309)
[ERROR]         at org.Apache.maven.DefaultMaven.doExecute(DefaultMaven.Java:194)
[ERROR]         at org.Apache.maven.DefaultMaven.execute(DefaultMaven.Java:107)
[ERROR]         at org.Apache.maven.cli.MavenCli.execute(MavenCli.Java:993)
[ERROR]         at org.Apache.maven.cli.MavenCli.doMain(MavenCli.Java:345)
[ERROR]         at org.Apache.maven.cli.MavenCli.main(MavenCli.Java:191)
[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] -> [Help 1]
org.Apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.Apache.maven.plugins:maven-failsafe-plugin:2.20.1:verify (default) on project domain: There are test failures.

Please refer to D:\Projects\example\domain\target\failsafe-reports for the individual test results.
Please refer to dump files (if any exist) [date]-jvmRun[N].dump, [date].dumpstream and [date]-jvmRun[N].dumpstream.
org.Apache.maven.surefire.booter.SurefireBooterForkException: The forked VM terminated without properly saying goodbye. VM crash or System.exit called?
Command was cmd.exe /X /C "c:\Java\jdk1.8.0_152\jre\bin\Java -jar C:\Users\ALEXAN~1\AppData\Local\Temp\surefire7778309393610397922\surefirebooter4888497370312362560.jar C:\Users\Alexander\AppData\Local\Temp\surefire7778309393610397922 2017-10-19T22-26-15_682-jvmRun1 surefire8701817832311419883tmp surefire_01518784195718073645tmp"
Error occurred in starting fork, check output in log
Process Exit Code: 1
Crashed tests:
com.example.domain.DecisionCharacteristicIT
        at org.Apache.maven.plugin.surefire.booterclient.ForkStarter.fork(ForkStarter.Java:686)
        at org.Apache.maven.plugin.surefire.booterclient.ForkStarter.fork(ForkStarter.Java:535)
        at org.Apache.maven.plugin.surefire.booterclient.ForkStarter.run(ForkStarter.Java:280)
        at org.Apache.maven.plugin.surefire.booterclient.ForkStarter.run(ForkStarter.Java:245)
        at org.Apache.maven.plugin.surefire.AbstractSurefireMojo.executeProvider(AbstractSurefireMojo.Java:1124)
        at org.Apache.maven.plugin.surefire.AbstractSurefireMojo.executeAfterPreconditionsChecked(AbstractSurefireMojo.Java:954)
        at org.Apache.maven.plugin.surefire.AbstractSurefireMojo.execute(AbstractSurefireMojo.Java:832)
        at org.Apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.Java:134)
        at org.Apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.Java:208)
        at org.Apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.Java:154)
        at org.Apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.Java:146)
        at org.Apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.Java:117)
        at org.Apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.Java:81)
        at org.Apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.Java:51)
        at org.Apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.Java:128)
        at org.Apache.maven.DefaultMaven.doExecute(DefaultMaven.Java:309)
        at org.Apache.maven.DefaultMaven.doExecute(DefaultMaven.Java:194)
        at org.Apache.maven.DefaultMaven.execute(DefaultMaven.Java:107)
        at org.Apache.maven.cli.MavenCli.execute(MavenCli.Java:993)
        at org.Apache.maven.cli.MavenCli.doMain(MavenCli.Java:345)
        at org.Apache.maven.cli.MavenCli.main(MavenCli.Java:191)
        at Sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at Sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.Java:62)
        at Sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.Java:43)
        at Java.lang.reflect.Method.invoke(Method.Java:498)
        at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.Java:289)
        at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.Java:229)
        at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.Java:415)
        at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.Java:356)

        at org.Apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.Java:213)
        at org.Apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.Java:154)
        at org.Apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.Java:146)
        at org.Apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.Java:117)
        at org.Apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.Java:81)
        at org.Apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.Java:51)
        at org.Apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.Java:128)
        at org.Apache.maven.DefaultMaven.doExecute(DefaultMaven.Java:309)
        at org.Apache.maven.DefaultMaven.doExecute(DefaultMaven.Java:194)
        at org.Apache.maven.DefaultMaven.execute(DefaultMaven.Java:107)
        at org.Apache.maven.cli.MavenCli.execute(MavenCli.Java:993)
        at org.Apache.maven.cli.MavenCli.doMain(MavenCli.Java:345)
        at org.Apache.maven.cli.MavenCli.main(MavenCli.Java:191)
        at Sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at Sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.Java:62)
        at Sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.Java:43)
        at Java.lang.reflect.Method.invoke(Method.Java:498)
        at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.Java:289)
        at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.Java:229)
        at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.Java:415)
        at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.Java:356)
Caused by: org.Apache.maven.plugin.MojoExecutionException: There are test failures.

Please refer to D:\Projects\example\domain\target\failsafe-reports for the individual test results.
Please refer to dump files (if any exist) [date]-jvmRun[N].dump, [date].dumpstream and [date]-jvmRun[N].dumpstream.
org.Apache.maven.surefire.booter.SurefireBooterForkException: The forked VM terminated without properly saying goodbye. VM crash or System.exit called?
Command was cmd.exe /X /C "c:\Java\jdk1.8.0_152\jre\bin\Java -jar C:\Users\ALEXAN~1\AppData\Local\Temp\surefire7778309393610397922\surefirebooter4888497370312362560.jar C:\Users\Alexander\AppData\Local\Temp\surefire7778309393610397922 2017-10-19T22-26-15_682-jvmRun1 surefire8701817832311419883tmp surefire_01518784195718073645tmp"
Error occurred in starting fork, check output in log
Process Exit Code: 1
Crashed tests:
com.example.domain.DecisionCharacteristicIT
        at org.Apache.maven.plugin.surefire.booterclient.ForkStarter.fork(ForkStarter.Java:686)
        at org.Apache.maven.plugin.surefire.booterclient.ForkStarter.fork(ForkStarter.Java:535)
        at org.Apache.maven.plugin.surefire.booterclient.ForkStarter.run(ForkStarter.Java:280)
        at org.Apache.maven.plugin.surefire.booterclient.ForkStarter.run(ForkStarter.Java:245)
        at org.Apache.maven.plugin.surefire.AbstractSurefireMojo.executeProvider(AbstractSurefireMojo.Java:1124)
        at org.Apache.maven.plugin.surefire.AbstractSurefireMojo.executeAfterPreconditionsChecked(AbstractSurefireMojo.Java:954)
        at org.Apache.maven.plugin.surefire.AbstractSurefireMojo.execute(AbstractSurefireMojo.Java:832)
        at org.Apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.Java:134)
        at org.Apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.Java:208)
        at org.Apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.Java:154)
        at org.Apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.Java:146)
        at org.Apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.Java:117)
        at org.Apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.Java:81)
        at org.Apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.Java:51)
        at org.Apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.Java:128)
        at org.Apache.maven.DefaultMaven.doExecute(DefaultMaven.Java:309)
        at org.Apache.maven.DefaultMaven.doExecute(DefaultMaven.Java:194)
        at org.Apache.maven.DefaultMaven.execute(DefaultMaven.Java:107)
        at org.Apache.maven.cli.MavenCli.execute(MavenCli.Java:993)
        at org.Apache.maven.cli.MavenCli.doMain(MavenCli.Java:345)
        at org.Apache.maven.cli.MavenCli.main(MavenCli.Java:191)
        at Sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at Sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.Java:62)
        at Sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.Java:43)
        at Java.lang.reflect.Method.invoke(Method.Java:498)
        at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.Java:289)
        at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.Java:229)
        at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.Java:415)
        at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.Java:356)

        at org.Apache.maven.plugin.surefire.SurefireHelper.throwException(SurefireHelper.Java:235)
        at org.Apache.maven.plugin.surefire.SurefireHelper.reportExecution(SurefireHelper.Java:112)
        at org.Apache.maven.plugin.failsafe.VerifyMojo.execute(VerifyMojo.Java:188)
        at org.Apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.Java:134)
        at org.Apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.Java:208)
        ... 20 more
[ERROR]
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.Apache.org/confluence/display/MAVEN/MojoExecutionException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR]   mvn <goals> -rf :domain

Dies ist das vollständige ausführliche Ausgabeprotokoll:https://files.fm/u/nfegb38f

Windows 10 1709 Update

Momentan habe ich die Meinung, dass dieses Problem möglicherweise mit dem Windows 10 1709-Update zusammenhängt. Ich verwende Docker und https://github.com/fabric8io/docker-maven-plugin für meine Integrationstests und fand es das folgende Thema - https://github.com/docker/for-win/issues/1221 Mit diesem Update und der Virtualisierung stimmt definitiv etwas nicht ...

7
alexanoid

Ich habe das gleiche Problem und habe drei Lösungen gefunden, die für mich arbeiten:

Problembeschreibung

Problem ist mit Maven Plugin Maven-Surefire-Plugin nur in Version 2.20.1 und 2.21.0. Ich habe geprüft und Sie verwenden Version 2.20.1.

Lösung 1

Aktualisieren Sie die Plugin-Version auf 2.22.0 . Fügen Sie in pom.xml hinzu:

<plugin>
  <groupId>org.Apache.maven.plugins</groupId>
  <artifactId>maven-surefire-plugin</artifactId>
  <version>2.22.0</version>
</plugin>

Lösung 2

Plugin-Version auf 2.20 herabstufen. Fügen Sie in pom.xml hinzu:

<plugin>
  <groupId>org.Apache.maven.plugins</groupId>
  <artifactId>maven-surefire-plugin</artifactId>
  <version>2.20</version>
</plugin>

Lösung 3

Verwenden Sie die Plugin-Konfiguration testFailureIgnore . Fügen Sie in pom.xml hinzu:

<plugin>
  <groupId>org.Apache.maven.plugins</groupId>
  <artifactId>maven-surefire-plugin</artifactId>
  <configuration>
    <testFailureIgnore>true</testFailureIgnore>
  </configuration>
</plugin>
9

VM kann aus vielen Gründen abstürzen. Ich möchte hier eine weitere hervorheben, da sie abstürzen kann.

Ich habe maven-surefire-plugin Version 2.22.0 mit jvm config -Xmx2048m verwendet, aber es schlug immer noch für mich fehl.

Fehlerursache: Ich habe aus Versehen den Windows-Befehl Eingabeaufforderung Breite der Fensterpuffergröße in 2000 geändert, anstatt die Höhe zu ändern. In meinem Fall stürzt die VM ab. Als ich den Build mit git bash ausgeführt habe, hat es gut funktioniert. So konnte ich das Problem herausfinden und den Befehl Eingabeaufforderung 'Fensterpuffergröße' auf den Standardwert zurücksetzen. Das funktionierte für mich einwandfrei.

Fehlerbehebungsschritt:

  • Verwenden Sie ein anderes Befehlstool, um dieses Problem zu überprüfen. wie Fensterbefehl Prompt, git bash.
2
manish kumar

Ich habe auch einen Fehler, der mit Forkstarter im surefire-Plugin zusammenhängt. Vielleicht können Sie versuchen, dies auf Ihrem pom.xml hinzuzufügen.

        <plugin>
            <groupId>org.Apache.maven.plugins</groupId>
            <artifactId>maven-surefire-plugin</artifactId>
            <configuration>
                <argLine>--add-modules Java.base ${argLine} -Xmx1024m -XX:MaxPermSize=256m</argLine>
                <forkCount>3</forkCount>
                <reuseForks>true</reuseForks>
            </configuration>
        </plugin>

Hoffe, das kann dir helfen

1
gomgomgom

Probieren Sie es mit dem Parameter Manven OPT aus

export MAVEN_OPTS="-Xms1024m -Xmx1G -XX:PermSize=1024m -noverify"

0
Sounak Saha