Files
gerrit/to_jetty.sh
Shawn O. Pearce ba1f56d15e Fix to_jetty so it doesn't unpack c3p0 from our WAR
We don't have c3p0 in the WAR anymore as its an "optional" feature
that the user should setup in their container.

Signed-off-by: Shawn O. Pearce <sop@google.com>
2009-02-06 16:32:56 -08:00

34 lines
626 B
Bash
Executable File

#!/bin/sh
# Builds and deploys into Jetty; primarily for debugging
jetty=$1
if [ -z "$jetty" ]
then
echo >&2 "usage: $0 jettydir"
exit 1
fi
if ! [ -f "$jetty/etc/jetty.xml" ]
then
echo >&2 "error: $jetty is not a Jetty installation"
exit 1
fi
ctx="$jetty/contexts/gerrit.xml" &&
mvn package &&
war=target/gerrit-*.war &&
cp $war "$jetty/webapps/gerrit.war" &&
if [ -f "$ctx" ]
then
touch "$ctx"
else
rm -f "$jetty/contexts/test.xml" &&
java -jar $war --cat extra/jetty_gerrit.xml >"$ctx" &&
echo >&2
echo >&2 "You need to copy JDBC drivers to $jetty/lib/plus"
echo >&2 "You need to edit and configure $ctx"
fi