Jenkins : Apache Geronimo 3.0

The XML code at the bottom, when place into a geronimo-web.xml file that was then added to the jenkins.war as WEB-INF/geronimo-web.xml, allowed me to deploy the jenkins.war file within Apache Geronimo 3.0 using the native deployer application.  Once you have created the file, you need to create a directory called WEB-INF and put the geronimo-web.xml into that subdirectory.  Then, assuming the jenkins.war file is in the same directory that you are in, execute the following (Linux):

zip -u jenkins.war WEB-INF/geronimo-web.xml

The updated jenkins.war file may then be deployed within Apache Geronimo.  You may wish to make the modification to the Java start up options which follow before you attempt to deploy it.

The deployment did cause an out-of-memory error in Geronimo that forced me to use a "kill -9" to stop it.  I had to increase the values of Java options in the <geronimo install directory>/bin/geronimo file as shown below.

JAVA_OPTS="-Xmx512m -XX:MaxPermSize=512m"

Geronimo then restarted successfully. 

Finally, the Jenkins web application needs to be started using the "Web Apps (WAR)" application.

geronimo-web.xml File Contents

<web-app xmlns="http://geronimo.apache.org/xml/ns/j2ee/web-2.0"
         xmlns:dep="http://geronimo.apache.org/xml/ns/deployment-1.2">
  <dep:environment>
    <dep:moduleId>
      <dep:groupId>dev.java.net</dep:groupId>
      <dep:artifactId>jenkins</dep:artifactId>
      <dep:version>1.499</dep:version>
      <dep:type>war</dep:type>
    </dep:moduleId>
    <dep:inverse-classloading />
  </dep:environment>
  <context-root>jenkins</context-root>
  <security-realm-name>geronimo-admin</security-realm-name>
  <security>
    <role-mappings>
      <role role-name="admin">
        <realm realm-name="geronimo-admin">
          <principal name="admin" />
        </realm>
      </role>
    </role-mappings>
  </security>
</web-app>