Spring Boot 应用程序 - Maven 问题

伊尔卡

不久前我正在开发一个应用程序,长时间刹车后我重新打开它并尝试更改某些内容并构建应用程序。

现在,当我尝试构建应用程序时,我遇到了 Maven 问题

您能否查看错误并支持我,我应该更改/添加什么?

我第一次看到这个问题,真的不知道出了什么问题,尤其是一个月前它工作正常。

[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 4.641 s
[INFO] Finished at: 2019-03-04T09:02:26+01:00
[INFO] Final Memory: 24M/464M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.21.0:test (default-test) on project myapplication: There are test failures.
[ERROR] 
[ERROR] Please refer to D:\JAVA\JAVA\JAVA\JAVA\target\surefire-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] 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_181\jre\bin\java" -jar C:\Users\user\AppData\Local\Temp\surefire3153501061038019130\surefirebooter5461745518324810198.jar C:\Users\user\AppData\Local\Temp\surefire3153501061038019130 2019-03-04T09-02-23_668-jvmRun1 surefire5550337711472069686tmp surefire_01955205028093789027tmp"
[ERROR] Error occurred in starting fork, check output in log
[ERROR] Process Exit Code: 1
[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_181\jre\bin\java" -jar C:\Users\user\AppData\Local\Temp\surefire3153501061038019130\surefirebooter5461745518324810198.jar C:\Users\user\AppData\Local\Temp\surefire3153501061038019130 2019-03-04T09-02-23_668-jvmRun1 surefire5550337711472069686tmp surefire_01955205028093789027tmp"
[ERROR] Error occurred in starting fork, check output in log
[ERROR] Process Exit Code: 1
[ERROR] at org.apache.maven.plugin.surefire.booterclient.ForkStarter.fork(ForkStarter.java:671)
[ERROR] at org.apache.maven.plugin.surefire.booterclient.ForkStarter.fork(ForkStarter.java:533)
...
[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)
[ERROR] -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.21.0:test (default-test) on project myapplication: There are test failures.

Please refer to D:\JAVA\JAVA\JAVA\JAVA\target\surefire-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.
The forked VM terminated without properly saying goodbye. VM crash or System.exit called?
Command was cmd.exe /X /C ""C:\Program Files\Java\jdk1.8.0_181\jre\bin\java" -jar C:\Users\user\AppData\Local\Temp\surefire3153501061038019130\surefirebooter5461745518324810198.jar C:\Users\user\AppData\Local\Temp\surefire3153501061038019130 2019-03-04T09-02-23_668-jvmRun1 surefire5550337711472069686tmp surefire_01955205028093789027tmp"
Error occurred in starting fork, check output in log
Process Exit Code: 1
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:\Program Files\Java\jdk1.8.0_181\jre\bin\java" -jar C:\Users\user\AppData\Local\Temp\surefire3153501061038019130\surefirebooter5461745518324810198.jar C:\Users\user\AppData\Local\Temp\surefire3153501061038019130 2019-03-04T09-02-23_668-jvmRun1 surefire5550337711472069686tmp surefire_01955205028093789027tmp"
Error occurred in starting fork, check output in log
Process Exit Code: 1
    at org.apache.maven.plugin.surefire.booterclient.ForkStarter.fork(ForkStarter.java:671)
    at org.apache.maven.plugin.surefire.booterclient.ForkStarter.fork(ForkStarter.java:533)
    at org.apache.maven.plugin.surefire.booterclient.ForkStarter.run(ForkStarter.java:278)
    at org.apache.maven.plugin.surefire.booterclient.ForkStarter.run(ForkStarter.java:244)
    ....
    at org.apache.maven.cli.MavenCli.execute(MavenCli.java:863)
    at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288)
    at org.apache.maven.cli.MavenCli.main(MavenCli.java:199)
    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.codehaus.classworlds.Launcher.main(Launcher.java:47)
Caused by: org.apache.maven.plugin.MojoExecutionException: There are test failures.

测试是:

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.21.0:test (default-test) on project application: There are test failures.
[ERROR] 
[ERROR] Please refer to D:\JAVA\JAVA\JAVA\JAVA\target\surefire-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] 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_181\jre\bin\java" -jar C:\Users\user\AppData\Local\Temp\surefire1234626952071494241\surefirebooter706544173501739081.jar C:\Users\user\AppData\Local\Temp\surefire1234626952071494241 2019-03-04T09-28-58_374-jvmRun1 surefire700658503828727378tmp surefire_09037920200833720438tmp"
[ERROR] Error occurred in starting fork, check output in log
[ERROR] Process Exit Code: 1
[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_181\jre\bin\java" -jar C:\Users\user\AppData\Local\Temp\surefire1234626952071494241\surefirebooter706544173501739081.jar C:\Users\user\AppData\Local\Temp\surefire1234626952071494241 2019-03-04T09-28-58_374-jvmRun1 surefire700658503828727378tmp surefire_09037920200833720438tmp"
[ERROR] Error occurred in starting fork, check output in log
[ERROR] Process Exit Code: 1
[ERROR] at org.apache.maven.plugin.surefire.booterclient.ForkStarter.fork(ForkStarter.java:671)
[ERROR] at org.apache.maven.plugin.surefire.booterclient.ForkStarter.fork(ForkStarter.java:533)
[ERROR] at org.apache.maven.plugin.surefire.booterclient.ForkStarter.run(ForkStarter.java:278)
...
[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)
[ERROR] -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.21.0:test (default-test) on project application: There are test failures.

Please refer to D:\JAVA\JAVA\JAVA\JAVA\target\surefire-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.
The forked VM terminated without properly saying goodbye. VM crash or System.exit called?
Command was cmd.exe /X /C ""C:\Program Files\Java\jdk1.8.0_181\jre\bin\java" -jar C:\Users\user\AppData\Local\Temp\surefire1234626952071494241\surefirebooter706544173501739081.jar C:\Users\user\AppData\Local\Temp\surefire1234626952071494241 2019-03-04T09-28-58_374-jvmRun1 surefire700658503828727378tmp surefire_09037920200833720438tmp"
Error occurred in starting fork, check output in log
Process Exit Code: 1
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:\Program Files\Java\jdk1.8.0_181\jre\bin\java" -jar C:\Users\user\AppData\Local\Temp\surefire1234626952071494241\surefirebooter706544173501739081.jar C:\Users\user\AppData\Local\Temp\surefire1234626952071494241 2019-03-04T09-28-58_374-jvmRun1 surefire700658503828727378tmp surefire_09037920200833720438tmp"
Error occurred in starting fork, check output in log
Process Exit Code: 1
    at org.apache.maven.plugin.surefire.booterclient.ForkStarter.fork(ForkStarter.java:671)
    at org.apache.maven.plugin.surefire.booterclient.ForkStarter.fork(ForkStarter.java:533)
    at org.apache.maven.plugin.surefire.booterclient.ForkStarter.run(ForkStarter.java:278)
    at org.apache.maven.plugin.surefire.booterclient.ForkStarter.run(ForkStarter.java:244)
    at org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeProvider(AbstractSurefireMojo.java:1149)
    at org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeAfterPreconditionsChecked(AbstractSurefireMojo.java:978)
    ...
    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.codehaus.classworlds.Launcher.main(Launcher.java:47)
Caused by: org.apache.maven.plugin.MojoExecutionException: There are test failures.

Please refer to D:\JAVA\JAVA\JAVA\JAVA\target\surefire-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.
The forked VM terminated without properly saying goodbye. VM crash or System.exit called?
Command was cmd.exe /X /C ""C:\Program Files\Java\jdk1.8.0_181\jre\bin\java" -jar C:\Users\user\AppData\Local\Temp\surefire1234626952071494241\surefirebooter706544173501739081.jar C:\Users\user\AppData\Local\Temp\surefire1234626952071494241 2019-03-04T09-28-58_374-jvmRun1 surefire700658503828727378tmp surefire_09037920200833720438tmp"
Error occurred in starting fork, check output in log
Process Exit Code: 1
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:\Program Files\Java\jdk1.8.0_181\jre\bin\java" -jar C:\Users\user\AppData\Local\Temp\surefire1234626952071494241\surefirebooter706544173501739081.jar C:\Users\user\AppData\Local\Temp\surefire1234626952071494241 2019-03-04T09-28-58_374-jvmRun1 surefire700658503828727378tmp surefire_09037920200833720438tmp"
Error occurred in starting fork, check output in log

我看到里面的日志文件

# Created on 2019-03-04T09:29:00.628
Killing self fork JVM. Maven process died.
尼兰詹·巴杜里

从终端:

添加-DskipTestsmvn命令作为解决方法。例如:

mvn package -DskipTests

这可以很好地构建包。

正如您提到的,从 IntelliJ 中,您可以执行以下操作:

View > Tool Windows > Maven Projects 单击名为 Skip Tests Mode 的按钮。从本质上讲,当您说运行包时,它将测试阶段从生命周期中移除。

我希望它暂时有所帮助,除非测试用例的问题得到解决。

本文收集自互联网,转载请注明来源。

如有侵权,请联系 [email protected] 删除。

编辑于
0

我来说两句

0 条评论
登录 后参与评论

相关文章

Spring Boot应用程序部署问题

部署 spring boot 应用程序的问题

Maven验证Spring Boot应用程序类的ClassNotFoundException

spring-boot,maven:无法运行或打包应用程序

Spring Boot应用程序作为Maven依赖项

无法使用Maven运行Spring Boot应用程序

Spring Boot测试多模块Maven应用程序

Spring Boot Camel应用程序出现问题

Spring Boot应用程序和并发问题

Spring Boot应用程序中聚合SQL函数的问题

Spring Boot JPA应用程序中的时区问题

创建Spring Boot应用程序时出现问题

使用Maven将Spring Boot应用程序打包到React应用程序中

如何创建/查找应用程序jar以使用嵌入式tomcat部署Spring Boot Maven应用程序?

Spring-Maven应用程序无法执行“ MVN spring-boot:run”

Spring Boot中的Maven依赖问题

Spring Boot和Maven exec插件问题

Maven发布问题:准备Spring Boot 2.3.1

如何解决用Maven导入spring应用程序的问题?

Spring boot 应用程序中 oracle maven 依赖的兼容版本是什么?

使用Java 9和Maven的Spring Boot应用程序编译失败

为Spring Boot应用程序生成war软件包时,maven构建失败?

具有 jar 依赖项的 Spring Boot 应用程序在 maven 构建后不会运行

使用Maven运行Spring Boot应用程序时出错:参数绑定的名称不能为null

带有 Maven 应用程序的 Spring Boot 的 Heroku jar 部署给出代码 = H10

通过 maven for Spring Boot 应用程序为 AWS Beanstalk 创建 .ebextensions 的正确方法是什么

Spring Boot应用程序如何受到Maven依赖关系的影响?

如何从另一个Maven模块启动Spring Boot应用程序?

Java 9 Spring Boot应用程序的Maven构建期间的RuntimeException