From a26e5c842817e62d001d7defc063f87728f0d7b6 Mon Sep 17 00:00:00 2001 From: Paulo Gustavo Veiga Date: Sat, 7 Nov 2009 19:12:12 -0200 Subject: [PATCH] Add installed generations . --- installer/build.sh | 51 +++++++++++++++++++++++++ installer/wisemapping.xml | 78 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 129 insertions(+) create mode 100755 installer/build.sh create mode 100644 installer/wisemapping.xml diff --git a/installer/build.sh b/installer/build.sh new file mode 100755 index 00000000..78035e94 --- /dev/null +++ b/installer/build.sh @@ -0,0 +1,51 @@ +#!/bin/bash + +#set -x +WISE_VERSION=0.94 +BASE_DIR=`pwd` +TARGET_DIR=$BASE_DIR/target +JETTY_DIR=$TARGET_DIR/wisemapping-$WISE_VERSION +WISE_WEBAPP_DIR=$JETTY_DIR/webapps/wisemapping + +# Clean ... +mvn -f $BASE_DIR/../pom.xml clean +mkdir target 2>/dev/null +rm -fr $JETTY_DIR +rm -fr $TARGET_DIR/jetty-hightide-7.0.0.v20091005 + +# Prepare resources .. +mvn -f $BASE_DIR/../pom.xml install + +if [ ! -f ./target/jetty-hightide-7.0.0.v20091005.zip ] +then + echo "Download Jetty" + wget http://dist.codehaus.org/jetty/jetty-7.0.0/jetty-hightide-7.0.0.v20091005.zip -P $TARGET_DIR +fi + +echo "Unzip Jetty ...:" +unzip $TARGET_DIR/jetty-hightide-7.0.0.v20091005.zip -d $TARGET_DIR/ > /dev/null +mv $TARGET_DIR/jetty-hightide-7.0.0.v20091005 $JETTY_DIR + + +# Clean unsed files ... +rm -r $JETTY_DIR/webapps/* +rm -r $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 + +#Build final Zip +cd $TARGET_DIR +zip -r wisemapping-$WISE_VERSION.zip wisemapping-$WISE_VERSION +cd .. diff --git a/installer/wisemapping.xml b/installer/wisemapping.xml new file mode 100644 index 00000000..a0d47575 --- /dev/null +++ b/installer/wisemapping.xml @@ -0,0 +1,78 @@ + + + + + + + + + + + + + + /wisemapping + /webapps/wisemapping + + + + + + + + + + + + + + Test Realm + /etc/realm.properties + + + + + + true + + + + + +