In this section, we will create a Maven-based Jenkins build job that will execute the pom.xml file for compilation, ubit test execution, and creating a package file. So let's begin!
On the Jenkins dashboard, click on New Item:
As it is a Maven-based project, we will select the Maven project template. In case it is an Ant-based application or any other automation task, then we can select the Freestyle project template to create Build Job. Select Maven project and click on OK. It will open the build job configuration page, as shown in the following screenshot:
In Source Code Management, provide a GitHub URL, SVN URL (install the subversion plugin first), or any repository URL. We can also access the code available on the filesystem:
In the Build section, select the Maven Version that we have configured in the Global Tool Configuration section. Provide...