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
![](https://www.edureka.co/community/?qa=blob&qa_blobid=14294685737249230499)
![](https://www.edureka.co/community/?qa=blob&qa_blobid=1201928210879954004)
3)cobertura
![](https://www.edureka.co/community/?qa=blob&qa_blobid=16371079369622532170)
4)PMD Report
![](https://www.edureka.co/community/?qa=blob&qa_blobid=14550706098720001289)
5)Archive
![](https://www.edureka.co/community/?qa=blob&qa_blobid=15365553169412498595)