Create a Job For Maven Project in Jenkins mean you’re going to perform a task in Jenkins using this Open Source tool for Continous integration. We can create and build a maven java project in the Jenkins server.
Create a Job For Maven In Jenkins:
It also helps the developer to compile, Test, Packages the code. So, whenever there will be an error or something wrong in the code. they can identify that portion instead of checking the whole code again.
Check Out: Pipeline in Jenkins
Create a job for Compile and Click on New Items to create a job
Here you have to give a name and click on FresStyle project and then OK.
Now come to the Source Code Management where you have to choose either git or SVN. I choose git and took the project from git-hub for making you understand.
Now come to build section and choose “invoke top-level Maven targets “ & click on Save.
After choosing this, You have to choose Maven here.
As you can see your first job has been created and I started it
In the end, the job got success means there is no issue in code.
And Repeat the same step for Test & Package. I’m just showing here in the image.
Every step will be the same just change here.
For Test Job
For Package job
YouTube Link: Create job using Compile
You’re done jenkins build java project