web-dev-qa-db-ja.com

Mavenビルドとmaven-failsafe-plugin-分岐したVMは適切に別れを告げることなく終了しました

統合テストにはDockerと https://github.com/fabric8io/docker-maven-plugin を使用しています。

私のWindows 10(をWindows 10 1709に更新した後)マシンで、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)

現在のところ、何が問題なのかわかりません。テストでエラーが発生することはありません。

この問題の理由と解決方法は何ですか?

[〜#〜]更新[〜#〜]

私のプロジェクトの構成は次のとおりです。

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>

サブモジュール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>

ご覧のとおり、追加しました

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

maven-surefire-pluginの設定に私の親pom.xmlを追加しましたが、役に立ちませんでした。

これは、-eおよび-Xを使用したMavenビルドの出力です

[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

これは完全な詳細な出力ログです:https://files.fm/u/nfegb38f

Windows 10 1709アップデート

現在、この問題はWindows 10 1709の更新に関連している可能性があると考えています...私のインテグレーションには、Dockerと https://github.com/fabric8io/docker-maven-plugin を使用しますテストを行い、次のトピックを見つけました- https://github.com/docker/for-win/issues/1221 この更新と仮想化に間違いがあります...

11
alexanoid

私は同じ問題を抱えており、私のために働く3つの解決策を見つけました:

問題の説明

Mavenプラグインに問題がありますmaven-surefire-pluginバージョン2.20.1および2.21.0のみ。チェックしたところ、バージョン2.20.1を使用しています。

解決策1

プラグインのバージョンを2.22.にアップグレードします。追加pom.xml

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

解決策2

プラグインのバージョンを2.2にダウングレードします。追加pom.xml

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

解決策3

プラグイン構成を使用testFailureIgnore。追加pom.xml

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

VMは、さまざまな理由でクラッシュする可能性があります。クラッシュする可能性のあるもう1つの原因を強調表示します。

Maven-surefire-pluginバージョン2.22.0をjvm config -Xmx2048mで使用していましたが、それでも失敗しました。

失敗の原因:高さを変更するのではなく、誤ってWindowsコマンドプロンプトの「ウィンドウバッファサイズ」の幅を2000に変更しました。それは私の場合vmクラッシュを引き起こします。 git bashを使用してビルドを実行すると、問題なく動作しました。だから私は問題を理解し、コマンドプロンプト 'ウィンドウバッファーサイズ'の幅をデフォルト値に戻し、それは私にとってはうまくいきました。

トラブルシューティングの手順:

  • この問題を確認するには、別のコマンドツールを使用してください。ウィンドウコマンドプロンプト、git bashなど。
2
manish kumar

私もそのようなエラーがあります。surefireプラグインのforkstarterに関連して、これを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>

これがあなたを助けることを願っています

1
gomgomgom

Manven OPTパラメーターで試してください

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

0
Sounak Saha