This page last changed on Nov 15, 2007 by asridhar.

By default Bamboo doesn't use the jetty.xml file to configure itself. If you need to modify the jetty.xml for advanced configuration (such as JNDI or https), you will also need to tell Bamboo to use it.

The method for doing this depends on whether you are using the bamboo.sh startup script or the Java Service Wrapper.

Step 1 - Instructing Bamboo to use jetty.xml 

If you are using the bamboo.sh script to start Bamboo:

The standard Bamboo startup script can be customised to use the jetty.xml file by modifying the following section in your bamboo.sh script (this section specifies how the Bamboo server will start):

RUN_CMD="java -Xms256m -Xmx512m -Djava.awt.headless=true -classpath $CLASSPATH -Dorg.mortbay.xml.XmlParser.NotValidating=true -Djetty.port=8085 com.atlassian.bamboo.server.Server 8085 ./webapp /"

Now, modify this startup script to read the jetty.xml file from webapp/WEB-INF/classes/jetty.xml by changing the RUN_CMD argument as follows:

RUN_CMD="java -Xms256m -Xmx512m -Djava.awt.headless=true -classpath $CLASSPATH -Dorg.mortbay.xml.XmlParser.NotValidating=true com.atlassian.bamboo.server.Server webapp/WEB-INF/classes/jetty.xml

If you are using the Java Service Wrapper to start Bamboo:

When starting up Bamboo with the Java Service Wrapper, you'll need to modify the wrapper.conf file in the conf directory.

  • You will need to replace the argument which specifies your port number "wrapper.app.parameter.2=8085" with "wrapper.app.parameter.2=../webapp/WEB-INF/classes/jetty.xml".
  • You will need to comment out the other arguments: "wrapper.app.parameter.3=../webapp" and "wrapper.app.parameter.4=/"

This will make Bamboo start up using your jetty.xml configuration file instead of the default three arguments (port, web app directory, context path).

Step 2 - Setting root context web application in jetty.xml

Edit the webapp root context in your jetty.xml file situated in <Bamboo-install>/webapp/WEB-INF/classes/jetty.xml. From

    <Call name="addWebApplication">
        <Arg>/bamboo</Arg>
        <Arg>
            <SystemProperty name="bamboo.webapp" default="bamboo-web-app/src/main/webapp"/>
        </Arg>
    </Call>
</Configure>

To

    <Call name="addWebApplication">
        <Arg>/bamboo</Arg>
        <Arg>
            <SystemProperty name="bamboo.webapp" default="full/path/to/bamboo/install/directory/webapp"/>
        </Arg>
    </Call>
</Configure>

Document generated by Confluence on Apr 14, 2008 01:39