Files
gerrit/to_jetty.sh
Nasser Grainawi e5e23b8940 Allow default of $JETTY_HOME in to_jetty.sh
Change-Id: I7b611ce34945ff48fcc4afd9f531dd11f0cda8a6
2009-10-28 11:35:00 -06:00

38 lines
745 B
Bash
Executable File

#!/bin/sh
# Builds and deploys into Jetty; primarily for debugging
jetty=$1
if [ -z "$jetty" ]
then
if [ -z "$JETTY_HOME" ]
then
echo >&2 "usage: $0 jettydir"
exit 1
fi
jetty=$JETTY_HOME
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 clean 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/jetty6/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