3 # Script to build the OnlineGlom.war file.
6 # confirm that we're in the right dir
7 lastdir=$(pwd | sed -e "s|/| |g" | awk '{print $NF}')
8 if [ $lastdir != "gwt-glom" ]; then
9 scriptname=$(echo $0 | sed -e "s|^\./||")
11 echo " Please run this script from the gwt-glom directory with this command:"
12 echo " ./utils/"$scriptname
17 echo "Removing generated files ... "
19 rm --interactive=never -rfv src/main/webapp/WEB-INF/classes/* \
20 src/main/webapp/WEB-INF/lib/* \
21 src/main/webapp/WEB-INF/deploy/* \
22 src/main/webapp/OnlineGlom/* \
23 src/main/webapp/logs/* \
24 src/main/gwt-unitCache \
25 target/* target/.generated
29 echo "Building and creating OnlineGlom.war. This can take a couple of minutes ... "
33 if [ $? -ne 0 -o ! -f target/gwt-glom-1.0-SNAPSHOT.war ]; then
34 echo "Error building OnlineGlom."
38 mv target/{gwt-glom-1.0-SNAPSHOT,OnlineGlom}.war
42 echo "The deployable war can be found here:"
44 echo " ./target/OnlineGlom.war"
46 echo "You can scp or sftp it to your server for deployment."