The instructions on this page apply to the Bamboo distribution, not the Bamboo EAR-WAR distribution.
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):
For Bamboo 3.0 and newer:
RUN_CMD="java -Xms256m -Xmx512m -Djava.awt.headless=true -classpath $CLASSPATH -Dorg.eclipse.jetty.xml.XmlParser.Validating=false -Djetty.port=8085 com.atlassian.bamboo.server.Server 8085 ./webapp /"
For Bamboo older than 3.0:
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:
For Bamboo 3.0 and newer:
RUN_CMD="java -Xms256m -Xmx512m -Djava.awt.headless=true -classpath $CLASSPATH -Dorg.eclipse.jetty.xml.XmlParser.Validating=false com.atlassian.bamboo.server.Server webapp/WEB-INF/classes/jetty.xml"
For Bamboo older than 3.0:
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
If you are using Bamboo 1.2.4 follow the instructions below:
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>
If you are using Bamboo 2.0 follow the instructions below:
Linux Platforms
Replace your existing <Bamboo-install>/webapp/WEB-INF/classes/jetty.xml
file, with this jetty.xml file.
Windows Platforms
Replace your existing <Bamboo-install>\webapp\WEB-INF\classes\jetty.xml file, with this jetty.xml file.