Files
gerrit/to_jetty.sh
Shawn O. Pearce 5267770243 Run mvn clean before packing to send to Jetty
mvn doesn't clean out the older compiled HTML pages, resuting in
the WAR containing multiple versions.  We only ever need the most
recent version in the WAR.

Signed-off-by: Shawn O. Pearce <sop@google.com>
2009-01-03 15:46:12 -08:00

32 lines
599 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
out=appdist/target/gerrit-*-bin.dir &&
ctx="$jetty/contexts/gerrit.xml" &&
(cd appdist && mvn clean package) &&
cp devdb/jdbc-postgresql.jar "$jetty/lib/plus" &&
cp $out/gerrit-*/www/gerrit-*.war "$jetty/webapps/gerrit.war" &&
if [ -f "$ctx" ]
then
touch "$ctx"
else
cp jetty_gerrit.xml "$ctx" &&
echo "You need to edit and configure $ctx"
fi