Difficulty: Beginner
Estimated Time: 10 minutes

This tutorial shows you how to use Jenkins to orchestrate building a simple Java application with https://maven.apache.org/[Maven].

If you are a Java developer who uses Maven and who is new to CI/CD concepts, or you might be familiar with these concepts but don't know how to implement building your application using Jenkins, then this tutorial is for you.

The simple Java application (which you'll obtain from a sample repository on GitHub) 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.

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 6

Get started

Get your java source code

The first thing you start to play this tutorial is that get a git repository.

Please execute following command to get initial code from internal git server.

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

Run jenkins server

Render port 3000: https://[[HOST_SUBDOMAIN]]-3000-[[KATACODA_HOST]].environments.katacoda.com/ Render port 8080: https://[[HOST_SUBDOMAIN]]-8080-[[KATACODA_HOST]].environments.katacoda.com/