web-dev-qa-db-fra.com

Maven build et maven-failafe-plugin - Le fichier forké VM terminé sans dire au revoir correctement

J'utilise Docker et https://github.com/fabric8io/docker-maven-plugin pour mes tests d'intégration.

Sur mon ordinateur Windows 10 (après la mise à jour vers Windows 10 1709), j'ai rencontré l'erreur suivante avec ma version Maven 3.5.0:

[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)

À l'heure actuelle, je n'ai aucune idée de ce qui peut être faux, je ne vois aucun échec dans mes tests.

Que peut être une raison de ce problème et comment le résoudre?

MIS À JOUR

Mon projet a la configuration suivante:

parent 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>

sous-module 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>

Comme vous pouvez le voir - j'ai ajouté 

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

à la configuration de maven-surefire-plugin à mon parent pom.xml mais cela n'a pas aidé.

Ceci est une sortie pour la construction Maven avec -e et -X

[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

Ceci est le journal de sortie détaillé complet:https://files.fm/u/nfegb38f

Windows 10 1709 mise à jour

À l'heure actuelle, je pense que ce problème peut être potentiellement lié à la mise à jour Windows 10 1709 ... J'utilise docker et https://github.com/fabric8io/docker-maven-plugin pour mes tests d'intégration et j'ai trouvé la rubrique suivante - https://github.com/docker/for-win/issues/1221 Quelque chose ne va vraiment pas avec cette mise à jour et cette virtualisation ...

7
alexanoid

J'ai le même problème et j'ai trouvé trois solutions qui fonctionnent pour moi:

Description du problème

Le problème est avec maven plugin maven-surefire-plugin uniquement dans les versions 2.20.1 et 2.21.0. J'ai vérifié et vous utilisez la version 2.20.1.

Solution 1

Mettez à niveau la version du plugin vers 2.22.0 . Ajouter dans pom.xml :

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

Solution 2

Rétrograder la version du plugin vers 2.20 . Ajouter dans pom.xml :

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

Solution 3

Utilisez la configuration du plugin testFailureIgnore . Ajouter dans pom.xml :

<plugin>
  <groupId>org.Apache.maven.plugins</groupId>
  <artifactId>maven-surefire-plugin</artifactId>
  <configuration>
    <testFailureIgnore>true</testFailureIgnore>
  </configuration>
</plugin>
9
Michał Orliński

La VM peut tomber en panne pour plusieurs raisons. Je souligne ici une autre cause pouvant provoquer un crash.

J'utilisais la version 2.22.0 du plugin maven-surefire avec jvm config -Xmx2048m, mais cela ne fonctionnait toujours pas.

Cause de l'incident: J'ai accidentellement modifié la commande windows de la commande Invite 'window buffer size' width en 2000 au lieu de modifier la hauteur. Dans mon cas, cela provoque le crash de vm. Quand j'ai couru la construction en utilisant git bash cela a bien fonctionné. J'ai donc pu comprendre le problème et rétablir la valeur par défaut de la commande Invite 'window buffer size' width, ce qui a bien fonctionné pour moi.

Étape de dépannage:

  • Utilisez un autre outil de commande pour vérifier ce problème. comme la commande de fenêtre Invite, git bash.
2
manish kumar

J'ai aussi une erreur comme celle-ci, liée à forkstarter sur le plugin surefire Peut-être que vous pouvez essayer d'ajouter ceci sur votre pom.xml

        <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>

Espérons que cela peut vous aider

1
gomgomgom

Essayez avec le paramètre Manven OPT

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

0
Sounak Saha