Error while trying to execute a maven project

0 votes

My project builds - compile, review, test, package were successful. But now i am getting the below error - please help as the only job that runs successful is: mvn compile

Error Snippet:

ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.19.1:test (default-test) on project addressbook: Execution default-test of goal org.apache.maven.plugins:maven-surefire-plugin:2.19.1:test failed: The forked VM terminated without properly saying goodbye. VM crash or System.exit called?
[ERROR] Command was /bin/sh -c cd /var/lib/jenkins/workspace/Module3_UnitTest && /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java -jar /var/lib/jenkins/workspace/Module3_UnitTest/target/surefire/surefirebooter3611152697016186981.jar /var/lib/jenkins/workspace/Module3_UnitTest/target/surefire/surefire967445581233235821tmp /var/lib/jenkins/workspace/Module3_UnitTest/target/surefire/surefire_06925418177303556069tmp
[ERROR] -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[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/PluginExecutionException
Build step Invoke
Jan 3, 2019 in Jenkins by Ali
• 11,360 points
8,567 views

1 answer to this question.

0 votes

Follow these steps:

In global tool configuration:

For Maven: Use the 3.3.9 version and check to install automatically.

Also, your JAVA_HOME does not seemed to have set up correctly.

For JAVA:use the java8 which is installed in VM Master, for that you have to set the JAVA_HOME and then you have to provide JAVA_HOME  in jenkins.

In the terminal run: export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64/

Copy the path /usr/lib/jvm/java-8-openjdk-amd64/

Go to jenkins uncheck install automatically and then provide the path you just copied!

Use the below configuration in your Jenkins:

1)For Compiling, you have to give maven goal as compile (Refer the test screenshot below)

2)Test

3)cobertura

4)PMD Report

5)Archive

answered Jan 3, 2019 by Vishnu

Related Questions In Jenkins

0 votes
1 answer

Error saying "localhost:3001error" When trying to run a build - Jenkins

There are two possible issues with this ...READ MORE

answered Dec 19, 2018 in Jenkins by Kalgi
• 52,350 points
1,452 views
0 votes
1 answer
0 votes
1 answer

Getting below error on Jenkins while creating a Maven Build Job

When you are using ssh to connect, ...READ MORE

answered Sep 3, 2019 in Jenkins by Hari
2,252 views
+15 votes
2 answers

Git management technique when there are multiple customers and need multiple customization?

Consider this - In 'extended' Git-Flow, (Git-Multi-Flow, ...READ MORE

answered Mar 27, 2018 in DevOps & Agile by DragonLord999
• 8,450 points
4,034 views
+2 votes
1 answer
0 votes
1 answer
0 votes
3 answers

How to get the Maven Version of a project in Jenkins?

Here is a snippet from our Jenkins ...READ MORE

answered Oct 4, 2019 in Jenkins by Petr Doležal
23,187 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP