gerrit/tools/to_jetty.sh
Shawn O. Pearce 44671f5c69 Rewrite our build as modular maven components
This refactoring splits the code up into different components, with
their own per-component CLASSPATH.  By moving all of our classes
into isolated components we can better isolate the classpaths and
try to avoid unexpected dependency problems.  It also allows us to
more clearly define which components are used by the GWT UI and
thus must be compiled under GWT, and which components are run on
the server and can therefore use more of the J2SE API.

Change-Id: I833cc22bacc5655d1c9099ed7c2b0e0a5b08855a
Signed-off-by: Shawn O. Pearce <sop@google.com>
2009-11-11 16:54:06 -08:00

39 lines
791 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=gerrit-war/target/gerrit-*.war &&
extra=gerrit-war/src/main/webapp/WEB-INF/extra/ &&
cp $war "$jetty/webapps/gerrit.war" &&
if [ -f "$ctx" ]
then
touch "$ctx"
else
rm -f "$jetty/contexts/test.xml" &&
cp "$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