diff options
Diffstat (limited to 'src/main/webapp/WEB-INF/extra/jetty_gerrit.xml')
-rw-r--r-- | src/main/webapp/WEB-INF/extra/jetty_gerrit.xml | 67 |
1 files changed, 67 insertions, 0 deletions
diff --git a/src/main/webapp/WEB-INF/extra/jetty_gerrit.xml b/src/main/webapp/WEB-INF/extra/jetty_gerrit.xml new file mode 100644 index 0000000000..9b1f943367 --- /dev/null +++ b/src/main/webapp/WEB-INF/extra/jetty_gerrit.xml @@ -0,0 +1,67 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE Configure PUBLIC "-//Mort Bay Consulting//DTD Configure//EN" "http://jetty.mortbay.org/configure.dtd"> +<!-- + + Jetty configuration to place "gerrit.war" into the root context, + so it answers to old-style URLs like "/$changeid" and "/mine". + + * Copy this file to $JETTY_HOME/contexts/gerrit.xml + * Edit user, password, jdbcUrl as necessary below for database. + * Edit mail.smtp.host, user, password as necessary for outgoing SMTP. + + * Copy jdbc/c3p0-0.9.1.2.jar to $JETTY_HOME/lib/plus/ + * Copy jdbc/postgresql-*.jdbc*.jar to $JETTY_HOME/lib/plus/ + * Copy www/gerrit-*.war to $JETTY_HOME/webapps/gerrit.war + + * Make sure you remove $JETTY_HOME/context/test.xml + +--> +<Configure id="wac" class="org.mortbay.jetty.webapp.WebAppContext"> + <Set name="contextPath">/</Set> + <Set name="war"><SystemProperty name="jetty.home" default="."/>/webapps/gerrit.war</Set> + + <Set name="extractWAR">true</Set> + <Set name="copyWebDir">true</Set> + <Set name="defaultsDescriptor"><SystemProperty name="jetty.home" default="."/>/etc/webdefault.xml</Set> + + <Set name="ConfigurationClasses"> + <Array type="java.lang.String"> + <Item>org.mortbay.jetty.webapp.WebInfConfiguration</Item> + <Item>org.mortbay.jetty.plus.webapp.EnvConfiguration</Item> + <Item>org.mortbay.jetty.plus.webapp.Configuration</Item> + <Item>org.mortbay.jetty.webapp.JettyWebXmlConfiguration</Item> + </Array> + </Set> + + <New id="ReviewDb" class="org.mortbay.jetty.plus.naming.Resource"> + <Arg></Arg> + <Arg>jdbc/ReviewDb</Arg> + <Arg> + <New class="com.mchange.v2.c3p0.ComboPooledDataSource"> + <Set name="driverClass">org.postgresql.Driver</Set> + <Set name="jdbcUrl">jdbc:postgresql:reviewdb</Set> + <Set name="user">gerrit2</Set> + <Set name="password">secretkey</Set> + </New> + </Arg> + </New> + + <New id="OutgoingSmtp" class="org.mortbay.jetty.plus.naming.Resource"> + <Arg></Arg> + <Arg>mail/Outgoing</Arg> + <Arg> + <New class="org.mortbay.naming.factories.MailSessionReference"> + <Set name="properties"> + <New class="java.util.Properties"> + <Put name="mail.smtp.host">localhost</Put> + <Put name="mail.smtp.port">25</Put> + </New> + </Set> + <!-- Uncomment if you need to authenticate to your SMTP server. + <Set name="user">gerrit2</Set> + <Set name="password">secretkey</Set> + /Uncomment --> + </New> + </Arg> + </New> +</Configure> |