How to set up Git and Maven Plugin in Jenkins

Last updated on May 28 2022
Uma Kulkarni

Table of Contents

How to set up Git and Maven Plugin in Jenkins

Jenkins – Git Setup

For this exercise, you’ve to ensure that Internet connectivity is present from the machine on which Jenkins is installed. In your Jenkins Dashboard (Home screen), click the Manage Jenkins option on the left hand side.

How to set up Git and Maven Plugin in Jenkins
How to set up Git and Maven Plugin in Jenkins

Within the next screen, click the ‘Manage Plugins’ option.

How to set up Git and Maven Plugin in Jenkins
How to set up Git and Maven Plugin in Jenkins

Within the next screen, click the Available tab. This tab will give a list of plugins which are available for downloading. Within the ‘Filter’ tab type ‘Git plugin’

How to set up Git and Maven Plugin in Jenkins
How to set up Git and Maven Plugin in Jenkins

The list will then be filtered. Check the Git Plugin option and click on the button ‘Install without restart’

How to set up Git and Maven Plugin in Jenkins
How to set up Git and Maven Plugin in Jenkins

The installation will then begin and the screen will be refreshed to show the status of the download.

How to set up Git and Maven Plugin in Jenkins
How to set up Git and Maven Plugin in Jenkins

Once all installations are complete, restart Jenkins by issue the subsequent command within the browser.

http://localhost:8080/jenkins/restart

After Jenkins is restarted, Git will be available as an option whilst configuring jobs. To verify, click on New Item within the menu options for Jenkins. Then enter a name for a job, within the subsequent case, the name entered is ‘Demo’. Select ‘Freestyle project’ as the item type. Click the Ok button.

How to set up Git and Maven Plugin in Jenkins
How to set up Git and Maven Plugin in Jenkins

Within the next screen, if you browse to the Source code Management section, you’ll now see ‘Git’ as an option.

How to set up Git and Maven Plugin in Jenkins
How to set up Git and Maven Plugin in Jenkins

Jenkins – Maven Setup

Step 1: Downloading and Setting Up Maven

The official website for maven is Apache Maven. If you click the given link, you can get the home page of the maven official website as shown below.

How to set up Git and Maven Plugin in Jenkins

While browsing to the site, go to the Files section and download the link to the Binary.zip file.

How to set up Git and Maven Plugin in Jenkins
How to set up Git and Maven Plugin in Jenkins

Once the file is downloaded, extract the files to the relevant application folder. For this purpose, the maven files will be placed in E:\Apps\apache-maven-3.3.3.

Step 2: Setting up Jenkins and Maven

Within the Jenkins dashboard (Home screen), click Manage Jenkins from the left-hand side menu.

How to set up Git and Maven Plugin in Jenkins
How to set up Git and Maven Plugin in Jenkins

Then, click on ‘Configure System’ from the right hand side.

How to set up Git and Maven Plugin in Jenkins

How to set up Git and Maven Plugin in Jenkins
How to set up Git and Maven Plugin in Jenkins

 

Within the Configure system screen, scroll down till you see the Maven section and then click on the ‘Add Maven’ button.

How to set up Git and Maven Plugin in Jenkins
How to set up Git and Maven Plugin in Jenkins

Uncheck the ‘Install automatically’ option.
Add any name for the setting and the location of the MAVEN_HOME.
Then, click on the ‘Save’ button at the end of the screen.

How to set up Git and Maven Plugin in Jenkins
How to set up Git and Maven Plugin in Jenkins

You can now create a job with the ‘Maven project’ option. Within the Jenkins dashboard, click the New Item option.

How to set up Git and Maven Plugin in Jenkins

How to set up Git and Maven Plugin in Jenkins
How to set up Git and Maven Plugin in Jenkins

So, this brings us to the end of blog. This Tecklearn ‘How to set up Git and Maven Plugin in Jenkins’ blog helps you with commonly asked questions if you are looking out for a job in DevOps. If you wish to learn Jenkins and build a career in DevOps domain, then check out our interactive, Continuous Integration with Jenkins Training, that comes with 24*7 support to guide you throughout your learning period. Please find the link for course details:

Continuous Integration with Jenkins

Continuous Integration with Jenkins Training

About the Course

Tecklearn has specially designed this Continuous Integration with Jenkins Training Course to advance your skills for a successful career in this domain. This course helps you learn server automation, continuous integration, build and configuration tools, Jenkins master-slave architecture, different types of plugins, implementing automated testing and more through hands-on projects and exercises. Upon completion of this online training, you will hold a solid understanding and hands-on experience with Jenkins.

Why Should you take Continuous Integration with Jenkins Training?

• Average salary of Jenkins Professional is $110k (Indeed.com Salary Data)
• Jenkins is an open-source automation server which enables developers around the world to reliably build, test, and deploy their software.

What you will Learn in this Course?

Introduction to DevOps

• What is Software Development
• Software Development Life Cycle
• Why DevOps?
• What is DevOps?
• DevOps Lifecycle
• DevOps Tools
• Benefits of DevOps
• How DevOps is related to Agile Delivery
• DevOps Implementation

Continuous Integration with Jenkins

• Introduction to Continuous Integration and Jenkins
• Jenkins Management
• Jenkins Master Slave Architecture
• Tools Required for CI
• Understanding CI/CD Pipelines
• Creating an end-to-end automated CI/CD Pipeline
• Jenkins Versions

0 responses on "How to set up Git and Maven Plugin in Jenkins"

Leave a Message

Your email address will not be published. Required fields are marked *