0% found this document useful (0 votes)
4 views

Assignment 1 Maven through jenkins

This document outlines the steps to set up a Maven project using Jenkins, starting from the installation of Jenkins to configuring a new Jenkins job. It includes instructions for installing the Maven plugin, setting up Maven, and configuring the job to build a Maven project from a Git repository. Finally, it describes how to save and run the Jenkins job to build the project and view the output.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views

Assignment 1 Maven through jenkins

This document outlines the steps to set up a Maven project using Jenkins, starting from the installation of Jenkins to configuring a new Jenkins job. It includes instructions for installing the Maven plugin, setting up Maven, and configuring the job to build a Maven project from a Git repository. Finally, it describes how to save and run the Jenkins job to build the project and view the output.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Assignment Task (TCS 651)

First project to set up a Maven project through Jenkins:

Step 1: Install Jenkins

Install Jenkins on your server or local machine by following the installation instructions for your
operating system. You can find the installation guide on the official Jenkins website:
https://www.jenkins.io/doc/book/installing/

Step 2: Configure Jenkins

Once Jenkins is installed, open your web browser and navigate to http://localhost:8080
(assuming Jenkins is running on your local machine). Follow the initial setup wizard to configure
Jenkins.

Step 3: Install Maven Plugin

Jenkins has a Maven plugin that allows you to easily build Maven projects. Install the Maven
plugin by going to Jenkins dashboard -> Manage Jenkins -> Manage Plugins -> Available tab,
then search for "Maven Integration" and install it.

Step 4: Setup Maven

Make sure Maven is installed on the machine where Jenkins is running. You can download
Maven from the official website: https://maven.apache.org/download.cgi
Once Maven is installed, configure the Maven installation in Jenkins by going to Jenkins
dashboard -> Manage Jenkins -> Global Tool Configuration -> Maven. Click on "Add Maven"
and provide the Maven installation details.

Step 5: Create a New Jenkins Job

Click on "New Item" on the Jenkins dashboard to create a new project.


Enter a name for your project and select "Freestyle project", then click "OK".

Step 6: Configure the Jenkins Job

In the configuration page of your Jenkins job, under the "Source Code Management" section,

select Git and provide the repository URL of your Maven project.

Under the "Build" section, add a build step to invoke Maven. Select "Invoke top-level Maven
targets" from the dropdown menu.
In the "Goals" field, enter the Maven goals you want to execute (e.g., clean install).
Optionally, you can configure post-build actions, such as archiving artifacts or sending
notifications.

Step 7: Save and Run the Jenkins Job

Once you've configured the Jenkins job, click on "Save" to save the configuration.
Click on "Build Now" to trigger a build of your Maven project. Jenkins will clone the repository,
build the project using Maven, and display the build output in the console.

You might also like