Difficulty: Beginner
Estimated Time: 10 minutes

This tutorial shows you how to use Jenkins to orchestrate building a simple Java application with Apache Maven.


This tutorial is for you if you are:

  • a Java developer who uses Maven and who is new to CI/CD concepts
  • familiar with these concepts but don't know how to implement building your application using Jenkins


Only an HTML5 Web Browser with WebSocket support is required.

This tutorial takes care of installing and running Jenkins for you.

Well done! You've just used Jenkins to build a simple Java application with Maven!

The "Build", "Test" and "Deliver" stages you created above are the basis for building more complex Java applications with Maven in Jenkins, as well as Java and Maven applications that integrate with other technology stacks.

Because Jenkins is extremely extensible, it can be modified and configured to handle practically any aspect of build orchestration and automation.

To learn more about what Jenkins can do, check out:

Build a Java app with Maven

Step 1 of 7

Get started

Tutorial Sandbox Environment

The right part of the screen contains your sandbox environment.

This sandbox provides you the following tools:

  • A web based IDE (top)
  • A web based Terminal (bottom)
  • A Jenkins LTS instance with Blue Ocean and Pipeline support
  • A Git Server with the Java Demo Sample application

Java Sample Application

The sample Java application outputs the string "Hello world!" and is accompanied by a couple of unit tests to check that the main application works as expected. The results of these tests are saved to a JUnit XML report.

Get The Java Sample Application Code

Obtain the simple "Hello world!" Java application using Git, by cloning it on the sandbox environment from the Git Server.

Execute the following command on the web based Terminal on your right. You can also click on

git clone https://butler:[email protected][[HOST_SUBDOMAIN]]-3000-[[KATACODA_HOST]].environments.katacoda.com/butler/simple-java-maven-app