2008-10-15 01:49:31 -04:00
|
|
|
#! /bin/sh
|
|
|
|
|
|
|
|
cleanup() {
|
|
|
|
find . -name runall.log | xargs rm
|
|
|
|
}
|
|
|
|
|
|
|
|
start_jetty()
|
|
|
|
{
|
2009-01-03 01:45:41 -05:00
|
|
|
mvn -o jetty:run > runall.log &
|
2008-10-15 01:49:31 -04:00
|
|
|
until (grep "Started Jetty Server" runall.log)
|
|
|
|
do
|
|
|
|
echo "Waiting for server to start..."
|
|
|
|
sleep 3
|
|
|
|
done
|
|
|
|
}
|
|
|
|
|
|
|
|
stop_jetty() {
|
|
|
|
kill $!
|
|
|
|
until (grep "Jetty server exiting" runall.log)
|
|
|
|
do
|
|
|
|
echo "Waiting for server to stop..."
|
|
|
|
sleep 2
|
|
|
|
done
|
|
|
|
}
|
|
|
|
|
|
|
|
cleanup
|
|
|
|
|
|
|
|
cd tutorial
|
2009-03-26 03:18:36 -04:00
|
|
|
echo "Running tutorial app..."
|
2008-10-15 01:49:31 -04:00
|
|
|
start_jetty
|
|
|
|
curl http://localhost:8080/tutorial/
|
|
|
|
stop_jetty
|
|
|
|
|
2009-03-26 03:18:36 -04:00
|
|
|
echo "Running contacts app..."
|
2008-10-15 01:49:31 -04:00
|
|
|
cd ../contacts
|
|
|
|
start_jetty
|
|
|
|
curl http://localhost:8080/contacts/
|
|
|
|
stop_jetty
|
|
|
|
|
2009-03-26 03:18:36 -04:00
|
|
|
echo "Running ldap app..."
|
2008-10-15 01:49:31 -04:00
|
|
|
cd ../ldap
|
|
|
|
start_jetty
|
|
|
|
curl http://localhost:8080/ldap/
|
|
|
|
stop_jetty
|
|
|
|
|
2009-03-26 03:18:36 -04:00
|
|
|
echo "Running preauth app..."
|
|
|
|
cd ../preauth
|
|
|
|
start_jetty
|
|
|
|
curl http://localhost:8080/preauth/
|
|
|
|
stop_jetty
|
|
|
|
|
|
|
|
|
2008-10-15 01:49:31 -04:00
|
|
|
cd ../cas
|
|
|
|
|
2009-04-12 08:23:23 -04:00
|
|
|
if [[ -e ./server/cas-server-webapp-3.3.1.war ]]
|
2008-10-15 01:49:31 -04:00
|
|
|
then
|
|
|
|
echo "Found cas server war. Running cas sample"
|
|
|
|
cd server
|
|
|
|
mvn jetty:run-war &
|
|
|
|
SERVERPID=$!
|
|
|
|
cd ../client
|
|
|
|
start_jetty
|
|
|
|
curl http://localhost:8080/cas-sample/
|
|
|
|
kill $SERVERPID
|
|
|
|
stop_jetty
|
|
|
|
fi
|
|
|
|
|
|
|
|
cleanup
|
|
|
|
|