Search code examples
javamavenmaven-surefire-plugins4sdk

Error upon mvn clean install - MojoExecutionException


I'm currently using this setting for my project archetype:

mvn archetype:generate  
"-DarchetypeGroupId=com.sap.cloud.s4hana.archetypes" 
"-DarchetypeArtifactId=scp-cf-tomee" "-DarchetypeVersion=2.1.2"  
"-DgroupId=com.sap.cloud.s4hana.examples" "-DarifactId=address-manager" 
"-Dversion=1.0-SNAPSHOT"

My java version on my MacOS is:

java version "1.8.0_172"
Java(TM) SE Runtime Environment (build 1.8.0_172-b11)
Java HotSpot(TM) 64-Bit Server VM (build 25.172-b11, mixed mode)

My JAVA_HOME:

/Library/Java/JavaVirtualMachines/jdk1.8.0_172.jdk/Contents/Home

Upon running, mvn clean install I get an error:

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire- 
plugin:3.0.0-M2:test (default-test) on project address-manager-unit- 
tests: There are test failures.
[ERROR] 
[ERROR] Please refer to 
/Users/XXXX/Documents/Personal/OpenSAP/Create and Deliver 
Cloud-Native SAP S:4HANA Extensions/S:4HANA Extensions/address- 
manager/unit-tests/target/surefire-reports for the individual test 
results.
[ERROR] Please refer to dump files (if any exist) [date].dump, [date]- 
jvmRun[N].dump and [date].dumpstream.
[ERROR] ExecutionException The forked VM terminated without properly 
saying goodbye. VM crash or System.exit called?

Please find attached some screenshots of the same. I had changed the pom.xml under unit tests to reflect version of surefire plugin as3.0.0-M2`, but the error does not go away.

enter image description here enter image description here

Any pointers to proceed would be greatly appreciated. Thank you.


Solution

  • it looks like the issue is that your path contains spaces and colons. I could reproduce the issue in that setup. Please re-try in a path without spaces and colons.

    Best regards

    Florian