Don't require c3p0 or H2 drivers

Packing these into our WAR isn't the best idea I've had.  Most
users will be dropping the connection pool into their container
CLASSPATH, and thus the copy within the WAR just takes up disk
space.  Bloating our WAR out makes it take longer to deploy a
new build.

I don't think anyone is actually using H2 with Gerrit right now.
All known deployments are on PostgreSQL.  So embedding the rather
large H2 driver just bloats the WAR even more, without giving us
anything in return.

Taking both of these out of the WAR drops it down by 1.6 MB, which
is a nice reduction in size.

Signed-off-by: Shawn O. Pearce <sop@google.com>
This commit is contained in:
Shawn O. Pearce
2009-02-06 14:38:11 -08:00
parent af12e8ed0e
commit 933fcd9df4
2 changed files with 23 additions and 27 deletions

View File

@@ -11,6 +11,13 @@ PostgreSQL:
* http://www.postgresql.org/docs/[Documentation]
Optional Libraries:
* link:http://jdbc.postgresql.org/download.html[PostgreSQL JDBC Driver]
* link:http://sourceforge.net/project/showfiles.php?group_id=25357[c3p0 JDBC Driver]
* link:http://www.bouncycastle.org/java.html[Bouncy Castle Crypto API]
* link:http://java.sun.com/products/javamail/downloads/index.html[JavaMail]
Downloading Gerrit
------------------
@@ -64,7 +71,7 @@ Setting up the Database
Currently PostgreSQL is the only supported database. H2 may also
work, but hasn't been tested in a while. The primary concern is
having support for the database in the gworm project.
having support for the database in the gwtorm project.
PostgreSQL
~~~~~~~~~~
@@ -204,21 +211,19 @@ call the unpacked directory `$JETTY_HOME`.
* link:http://dist.codehaus.org/jetty/[Jetty Downloads]
Install the JDBC drivers, using either the ones that come embedded
with Gerrit, or by downloading them yourself from their mirrors:
====
java -jar gerrit.war --cat lib/c3p0-0.9.1.2.jar >$JETTY_HOME/lib/plus/c3p0-0.9.1.2.jar
java -jar gerrit.war --cat lib/postgresql-8.3-603.jdbc3.jar >$JETTY_HOME/lib/plus/postgresql-8.3-603.jdbc3.jar
====
Install the required JDBC drivers by copying them into the
`'$JETTY_HOME'/lib/plus` directory. Drivers can be obtained from
their source projects:
Consider installing Bouncy Castle Cypto APIs. Some of their
* link:http://jdbc.postgresql.org/download.html[PostgreSQL JDBC Driver]
* link:http://sourceforge.net/project/showfiles.php?group_id=25357[c3p0 JDBC Driver]
Consider installing Bouncy Castle Cypto APIs into the
`'$JETTY_HOME'/lib/plus` directory. Some of the Bouncy Castle
implementations are faster than then ones that come in the JRE,
and they may support additional algorithms:
and they may support additional encryption algorithms:
* link:http://www.bouncycastle.org/java.html[Bouncy Castle]
====
cp bcprov-*.jar $JETTY_HOME/lib/plus/
====
* link:http://www.bouncycastle.org/java.html[Bouncy Castle Crypto API]
Copy Gerrit into the deployment:
====
@@ -273,6 +278,11 @@ application context to point to the database you just created.
Don't forget to ensure your JNDI configuration can load the
necessary JDBC drivers.
('Optional') Add Bouncy Castle Crypto API to the web application's
classpath. Usually its best to load this library from the servlet
container's extensions directory, but gerrit.war could also be
modified to include it.
('Optional') Configure the JNDI name `mail/Outgoing` for the web
application context to be a factory for a `javax.mail.Session`,
with the connection information necessary to send outgoing emails.