Jenkins with Maven

The code created by Developers will be in source code format. The testers or QA team will not have an idea on source code. Suppose developers write code in Java and we need to have it as an executable file. In the case of Java we use Maven. For java these files are called jar files. While creating the code we need some dependences or packages. Then only that application will work. So testers can test the code using jar files. That means they need not have to install other packages.

Packaging is converting the large code into an executable file. Maven gets the instructions from pom.xml, so that it downloads and install the required packages.

  • mvn install – cmd to install maven.
  • mvn compile – To compile the code
  • mvn test – For testing the code

Jenkins will be in a server. There we need to install Maven. So when developers commit code, Jenkins will convert source code to Jar files automatically.

  • War files – web application package
  • Jar files – Usually backend application package

For installing Jenkins we need a server, we can use a cloud server(Virtual Machines) or local machine. Before installing Jenkins, Java needs to be installed.
Once Jenkins is installed add an 8080 port to your IP address and use the Jenkins UI.
Suppose is your IP then for accessing jenkins the link will be
Once you are logged into jenkins click create job then choose freestyle or pipeline. In the next window choose git as source code management and add git url.
Build Triggers section can be used to mention when the pipeline is to be initiated.
Record fingerprint option is used to match our jar files with the jar file in Jenkins.