How to use Jetty with JIRA
These instructions have been tested against jetty 6.0.1 and jetty 6.1 with Jira 3.6.5 using JOTM 2.1.10, HSQL 1.7 and also Atomikos 3.1.0-rc3 and HSQL 1.7.
Prepare the JIRA webapp
- if you've downloaded the standalone distribution of JIRA:
- copy the commons/lib/hsqldb-1.7.1-patched.jar into $jetty.home/lib/ext
- copy the atlassian-jira directory into your $jetty.home/webapps-plus directory.
- if you've downloaded the webapp distribution of JIRA:
- regardless of which distribtion you downloaded, now edit the $jetty.home/webapps-plus/atlassian-jira/WEB-INF/web.xml file:
- add a <resource-ref> for the DataSource used by JIRA:
- if you want to use a mail Session JNDI lookup, then also add a <resource-ref> for it too:
- set up the jetty installation for the transaction manager of your choice, following the instructions for JOTM here or Atomikos here.
- configure your commons-logging implementation so that JIRA (and JOTM if you are using it) send their log messages to the same log as the jetty server. You do this by using the jcl104-over-slf4j.jar (Commons Logging over SLF4J) and an slf4j log implementation jar. You can find both of these in $jetty.home/lib/jsp-2.0, and simply copy them up into into the $jetty.home/lib/ directory. Alternatively, if you want to use commons-logging, you will need to copy the commons-logging jar and a commons logging impl into the $jetty.home/lib/ directory instead.
- setup the JNDI resources. To save you some time, you can use the jetty-jira.xml file attached to this page, copy it into $jetty.home/etc, and uncomment either the Atomikos or the JOTM setup as you prefer. The file also contains a mail Session JNDI binding which you can uncomment and configure if you elected to setup a <resource-ref> for it in the JIRA web.xml in previous steps.
- run JIRA in jetty with:
For the curious, here's what the jetty-jira.xml file looks like: