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 2 in Jenkins by Ali
• 10,290 points
49 views

1 answer to this question.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
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 2 by Vishnu

Related Questions In Jenkins

0 votes
1 answer

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

Follow the below steps: 1.      Install the Groovy ...READ MORE

answered Aug 9, 2018 in Jenkins by Sophie may
• 9,050 points
126 views
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
• 35,750 points
68 views
0 votes
1 answer
0 votes
1 answer

Error while talking to remote Oracle DB using Jenkins-CI

I installed Oracle XE to talk to ...READ MORE

answered May 1, 2018 in Jenkins by shubham
• 6,480 points
170 views
+13 votes
2 answers
0 votes
1 answer
+2 votes
3 answers

Permission denied error while running a simple job in Jenkins

Hey @Hannah, try changing the permissions using ...READ MORE

answered Oct 25, 2018 in Jenkins by krishti
2,870 views
+2 votes
5 answers

© 2018 Brain4ce Education Solutions Pvt. Ltd. All rights Reserved.
"PMP®","PMI®", "PMI-ACP®" and "PMBOK®" are registered marks of the Project Management Institute, Inc. MongoDB®, Mongo and the leaf logo are the registered trademarks of MongoDB, Inc.