Add installed generations .

This commit is contained in:
Paulo Gustavo Veiga 2009-11-07 19:12:12 -02:00
parent b3b71db425
commit a26e5c8428
2 changed files with 129 additions and 0 deletions

51
installer/build.sh Executable file
View File

@ -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 ..

78
installer/wisemapping.xml Normal file
View File

@ -0,0 +1,78 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "http://www.eclipse.org/jetty/configure.dtd">
<!-- ==================================================================
Configure and deploy the wisemapping web application in $(jetty.home)/webapps/wisemapping
Note. If this file did not exist or used a context path other that /wisemapping
then the default configuration of jetty.xml would discover the wisemapping
webapplication with a WebAppDeployer. By specifying a context in this
directory, additional configuration may be specified and hot deployments
detected.
===================================================================== -->
<Configure class="org.eclipse.jetty.webapp.WebAppContext">
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
<!-- Required minimal context configuration : -->
<!-- + contextPath -->
<!-- + war OR resourceBase -->
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
<Set name="contextPath">/wisemapping</Set>
<Set name="resourceBase"><SystemProperty name="jetty.home" default="."/>/webapps/wisemapping</Set>
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
<!-- Optional context configuration -->
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
<!-- <Set name="extractWAR">true</Set>
<Set name="copyWebDir">false</Set>
<Set name="defaultsDescriptor"><SystemProperty name="jetty.home" default="."/>/etc/webdefault.xml</Set>
<Set name="overrideDescriptor"><SystemProperty name="jetty.home" default="."/>/contexts/wisemapping.d/override-web.xml</Set> -->
<!-- virtual hosts
<Set name="virtualHosts">
<Array type="String">
<Item>www.myVirtualDomain.com</Item>
<Item>localhost</Item>
<Item>127.0.0.1</Item>
</Array>
</Set>
-->
<!-- disable cookies
<Get name="sessionHandler">
<Get name="sessionManager">
<Set name="usingCookies" type="boolean">false</Set>
</Get>
</Get>
-->
<Get name="securityHandler">
<Set name="loginService">
<New class="org.eclipse.jetty.security.HashLoginService">
<Set name="name">Test Realm</Set>
<Set name="config"><SystemProperty name="jetty.home" default="."/>/etc/realm.properties</Set>
<!-- To enable reload of realm when properties change, uncomment the following lines -->
<!-- changing refreshInterval (in seconds) as desired -->
<!--
<Set name="refreshInterval">5</Set>
<Call name="start"></Call>
-->
</New>
</Set>
<Set name="checkWelcomeFiles">true</Set>
</Get>
<!-- Non standard error page mapping -->
<!--
<Get name="errorHandler">
<Call name="addErrorPage">
<Arg type="int">500</Arg>
<Arg type="int">599</Arg>
<Arg type="String">/dump/errorCodeRangeMapping</Arg>
</Call>
</Get>
-->
</Configure>