Jenkins : Installation via Maven WAR Overlay

Installation via Maven WAR Overlay

This page describes how to install Jenkins using a Maven WAR Overlay method.


While Jenkins provides extremely easy installation and execution (e.g. java -jar jenkins.war), sometimes more complicated setups are required. It is very common to want to deploy the jenkins.war into an existing Apache Tomcat installation. This is the exact scenario that will be described here.


The preferred mechanism is to create a Maven project which can be used to build and deploy Jenkins to your Apache Tomcat. It utilizes the maven-war-plugin and cargo-maven2-plugin to build and deploy.

You need to create a project hierarchy with the pom.xml and context.xml as shown below. Once this is in place, you need to update the JENKINS_URL to be the URL for your Tomcat instance. Now, the only thing you have to do is run mvn clean package cargo:redeploy and watch the Maven magic.

Directory Hierarchy
├── pom.xml
└── src/
    └── main/
        └── webapp/
            └── META-INF/
                └── context.xml
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="" xmlns:xsi=""






<?xml version="1.0" encoding="UTF-8"?>
<Context logEffectiveWebXml="true" path="/">


  • This manual presumes you are using Tomcat 7.x, if not, you should update the cargo plugin configuration accordingly
  • Make sure that mvn clean package builds the war file, if not, you probably have some sort of network issue or you're not using the right Jenkins version number
  • Make sure that that you have configured the Tomcat 7.x manager application, and the updated tomcat-users.xml which split out roles very different than Tomcat 6.x
  • Make sure that you have the correct tomcat manager username and password