Minor fixes

This commit is contained in:
Paulo Gustavo Veiga
2012-07-01 20:23:18 -03:00
parent 59e065c8b5
commit 4c4a8d9553
3 changed files with 19 additions and 14 deletions

View File

@@ -1,5 +1,6 @@
#!/bin/bash
set -x
set -e
set -u
@@ -8,8 +9,8 @@ BASE_DIR=`pwd`
TARGET_DIR=$BASE_DIR/target
JETTY_DIR=$TARGET_DIR/wisemapping-$WISE_VERSION
WISE_WEBAPP_DIR=$JETTY_DIR/webapps/wisemapping
JETTY_DIST_DIR=jetty-distribution-7.6.0.v20120127
JETTY_ZIP=${JETTY_DIST_DIR}.zip
JETTY_DIST_DIR=jetty-distribution-8.1.4.v20120524.zip
JETTY_ZIP=${JETTY_DIST_DIR}
# Clean ...
mvn -o -f $BASE_DIR/../pom.xml clean
@@ -18,12 +19,12 @@ rm -fr ${JETTY_DIR}
rm -fr ${TARGET_DIR}/${JETTY_DIST_DIR}
# Prepare resources ..
mvn -o -f $BASE_DIR/../pom.xml install
mvn -o -f $BASE_DIR/../pom.xml install -Dmaven.test.skip=true
if [ ! -f ./target/${JETTY_ZIP} ]
then
echo "Download Jetty"
wget http://download.eclipse.org/jetty/stable-7/dist/${JETTY_ZIP} -P $TARGET_DIR
wget http://download.eclipse.org/jetty/8.1.4.v20120524/dist/jetty-distribution-8.1.4.v20120524.zip -P $TARGET_DIR
fi
echo "Unzip Jetty ...:"
@@ -31,23 +32,18 @@ unzip ${TARGET_DIR}/${JETTY_ZIP} -d ${TARGET_DIR}/ > /dev/null
mv ${TARGET_DIR}/${JETTY_DIST_DIR} ${JETTY_DIR}
# Clean unsed files ...
rm -r $JETTY_DIR/webapps/*
rm -r $JETTY_DIR/contexts/*
rm -rf $JETTY_DIR/webapps/*
rm -rf $JETTY_DIR/contexts/*
# Now, start wise-webapps customization ...
echo "Unzip wisemappig.war ..."
mkdir $WISE_WEBAPP_DIR
unzip $BASE_DIR/../wise-webapp/target/wisemapping.war -d $WISE_WEBAPP_DIR >/dev/null
rm $WISE_WEBAPP_DIR/images/wisemapping.swf
mkdir $WISE_WEBAPP_DIR/WEB-INF/database
cp -r $BASE_DIR/../wise-webapp/target/db/* $WISE_WEBAPP_DIR/WEB-INF/database/
cp $BASE_DIR/wisemapping.xml $JETTY_DIR/contexts/
# Some replacements ...
sed 's/target\/db\/wisemapping/webapps\/wisemapping\/WEB-INF\/database\/wisemapping/' $WISE_WEBAPP_DIR/WEB-INF/app.properties > $WISE_WEBAPP_DIR/WEB-INF/app.properties2
mv $WISE_WEBAPP_DIR/WEB-INF/app.properties2 $WISE_WEBAPP_DIR/WEB-INF/app.properties
# Distribute scripts
cp -r $BASE_DIR/../wise-webapp/src/test/sql $TARGET_DIR/wisemapping-$WISE_VERSION/config