Maven确信大火突然开始失效

时间:2019-05-30 00:01:32

标签: java maven jenkins jvm maven-surefire-plugin

我有一个詹金斯(Jenkins)工作,上周五正在工作,从昨天开始就失败了。这是我的设置

Maven 3.3.9
Oracle JDK 1.8 u144

<plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-surefire-plugin</artifactId>
    <version>2.18.1</version>
</plugin>

我尝试添加-e和-X选项,甚至增加日志级别,而我在日志中看到的唯一消息是:

Caused by: org.apache.maven.plugin.PluginExecutionException: Execution default-test of goal org.apache.maven.plugins:maven-surefire-plugin:9c6abc2:test failed: The forked VM terminated without saying properly goodbye. VM crash or System.exit called ?
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:145)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:207)
    ... 31 more
Caused by: java.lang.RuntimeException: The forked VM terminated without saying properly goodbye. VM crash or System.exit called ?

这是我尝试过的事情列表(全部来自 Stackoverflow ):

  • 3.0.0-M3
  • 版本2.21.0
  • reuseForks = false
  • useSystemClassLoader = false
  • trimStackTrace = false
  • argLine = Xmx2048m -XX:MaxPermSize = 512m,尝试增加内存,因为我认为分叉的VM崩溃了
  • useSystemClassLoader = true和useManifestOnlyJar = false
  • Oracle Java 8 u144
  • Oracle Java 8 u141

我注意到的另一件事是,当执行分叉的JVM时,似乎未传递“ argLine”。例如,这来自日志:

-------------------------------------------------------
 T E S T S
-------------------------------------------------------
Forking command line: /bin/sh -c cd /data/apps/jenkins/workspace/Build_Deploy_Full_Dev/myapp/core && /data/apps/java/jdk1.8.0_144/jre/bin/java -jar /data/apps/jenkins/workspace/Build_Deploy_Full_Dev/myapp/core/target/surefire/surefirebooter1916960086357827445.jar /data/apps/jenkins/workspace/Build_Deploy_Full_Dev/myapp/core/target/surefire/surefire2156897915383473994tmp /data/apps/jenkins/workspace/Build_Deploy_Full_Dev/myapp/core/target/surefire/surefire_03179213296845219723tmp

可以看出,调用派生的JVM的命令行没有参数。另外,最后的澄清是,我的测试未调用“ System.exit”之类的任何调用。我将不胜感激!

1 个答案:

答案 0 :(得分:0)

我从安装Jenkins的同一服务器运行该构建,但从Jenkins外部运行,换句话说,从命令行运行。我获得了成功的构建,这表明我既不是Maven也不是我的依存关系不是问题原因的一部分。重新启动完成后,构建开始正常工作。