Hi All, this document deals with how to build a maven application using Jenkins.
Jenkins is an open source automation server written in Java. Jenkins helps to automate the non-human part of the software development process, with continuous integration and facilitating technical aspects of continuous delivery. It is a server-based system that runs in servlet containers such as Apache Tomcat.

Jenkins is one of the best open source tools for continuous integration and continuous deployment. Here we are going to see how to build a maven application using Jenkins.

Prerequisites

Jenkins server installed and configured with maven. If not done follow this link to perform it.
Java application with maven build.

Configuration

Step 1: Login to Jenkins server.


Step 2: Install the Maven integration plugin from the plugin manager.


Step 3: Create your first maven job. While creating the select maven project.


Step 3: Select the source code source as git, since my source code is in GIT I uses this, you can use either SVN as well. If you are using SVN make sure you have installed SVN plugin in Jenkins.

Step 4: Configure the source code repository.

Step 5: Add the Credentials of your repository by selecting add.

Step 6: In Build section what outcome you want from the source code. Here I’m selecting the clean package.

Step 7: Save and apply.

Step 8: Go to your created job and click on the build now.

Step 9: You can see the console output of your job by selecting console output in the left-hand side.

Step 10: After some time you can see your build is succeeded.

Step 11: You can see the output file once you navigate to workspaces under your job. Output jar file is available in the target folder.

Now you have build a java maven application using Jenkins

© 2018, Techrunnr. All rights reserved.

#1
#2
#3
Questions Answered
Articles Written
Overall Points

Prabhin Prabharkaran

He is Technical professional. He is a person who loves to share tricks and tips on the Internet. He Posts what he does!!

Leave a Reply

Please wait...

Subscribe to our newsletter

Want to be notified when our article is published? Enter your email address and name below to be the first to know.