Reputation: 1640
When I run the maven command 'mvn clean install' from Eclipse (Neon.3, EE version) I get the error:
org.apache.maven.plugin.PluginExecutionException: Execution default-test of goal org.apache.maven.plugins:maven-surefire-plugin:2.12.4:test failed: The forked VM terminated without saying properly goodbye. VM crash or System.exit called ?
The Eclipse installation uses m2e-plugin (default) and Java 1.8.0_131. But I have also tried with some earlier versions, including 1.7.x.
Tried to look for a solution to this issue and found this: The forked VM terminated without saying properly goodbye. VM crash or System.exit called
Tried to add the following configuration to the pom.xml
<profiles>
<profile>
<id>normal_build_profile</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.20</version>
<configuration>
<!-- Tried with lots of different values, no change -->
<threadCount>3</threadCount>
<forkCount>3</forkCount>
<reuseForks>true</reuseForks>
<argLine>-Xmx1024m -XX:MaxPermSize=256m</argLine>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>
With the configuration above, it freezes in Eclipse while executing this command (from log)
[DEBUG] Forking command line: cmd.exe /X /C "C:\Java\jdk1.8.0_131\jre\bin\java -Xmx1024m -XX:MaxPermSize=256m -jar C:\workspace\miniTest\target\surefire\surefirebooter2156530837851203141.jar C:\workspace\miniTest\target\surefire 2017-06-08T08-58-59_461-jvmRun1 surefire2401124720884095509tmp surefire_03952770368534211516tmp"
But when I run 'mvn clean install' from the command line, all is good. The Eclipse is configured to use the same Maven installation as used at the command line. The Maven version would be 3.5.0. (Though this happened also with 3.3.3 version)
As this seems to be related to running test, I should note that I do also have these:
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<!-- 4.11 Does not require that hamcrest dependency -->
<version>4.12</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-all</artifactId>
<version>1.3</version>
<scope>test</scope>
</dependency>
Does anyone have an idea what is going on with the Eclipse as this seems to be related to it?
It's rather inconvenient to do build from the command line.
Running unit tests in Eclipse without Maven is ok.
Upvotes: 1
Views: 1224
Reputation: 1640
<threadCount>3</threadCount>
<forkCount>0</forkCount>
<reuseForks>false</reuseForks>
Seems to do the trick at least at the case I used to debug this issue.
Upvotes: 1