Author: struberg
Date: Sat May 30 19:32:00 2015
New Revision: 1682645
URL: http://svn.apache.org/r1682645
Log:
OWB-1077 add install script for OWB + MyFaces on Tomcat7 & 8
Added:
openwebbeans/trunk/distribution/src/main/install_scripts/install_owb_tomcat7_myfaces.sh
- copied, changed from r1682394,
openwebbeans/trunk/distribution/src/main/install_scripts/install_owb_tomcat7.sh
Copied:
openwebbeans/trunk/distribution/src/main/install_scripts/install_owb_tomcat7_myfaces.sh
(from r1682394,
openwebbeans/trunk/distribution/src/main/install_scripts/install_owb_tomcat7.sh)
URL:
http://svn.apache.org/viewvc/openwebbeans/trunk/distribution/src/main/install_scripts/install_owb_tomcat7_myfaces.sh?p2=openwebbeans/trunk/distribution/src/main/install_scripts/install_owb_tomcat7_myfaces.sh&p1=openwebbeans/trunk/distribution/src/main/install_scripts/install_owb_tomcat7.sh&r1=1682394&r2=1682645&rev=1682645&view=diff
==============================================================================
---
openwebbeans/trunk/distribution/src/main/install_scripts/install_owb_tomcat7.sh
(original)
+++
openwebbeans/trunk/distribution/src/main/install_scripts/install_owb_tomcat7_myfaces.sh
Sat May 30 19:32:00 2015
@@ -19,16 +19,25 @@
# -----------------------------------------------------------------------------
# -----------------------------------------------------------------------------
-# Install script for Apache OpenWebBeans to Tomcat7 and higher
+# Install script for Apache OpenWebBeans and Apache MyFaces to Tomcat7 and
higher
#
# This script ALSO works with Tomcat8 and Tomcat9!
#
# usage example:
-# First unzip the openwebbeans binary distribution file.
+# Download the openwebbeans binary distribution from
+# http://openwebbeans.apache.org/download.html
+# Also download the Apache MyFaces binary distribution from
+# http://myfaces.apache.org/download.html
+#
+# Then unzip the openwebbeans binary distribution file
+# and change into it. This is where you find THIS script ;)
+#
# From within the unzipped folder start this script:
-# $> ./install_owb_tomcat7.sh /opt/apache-tomcat-8.0.23
-# instead of passing the parameter you can also set the
-# CATALINA_HOME environment variable
+# $> ./install_owb_tomcat7.sh somelocation/myfaces-core-assembly-2.2.8-bin.zip
/opt/apache-tomcat-8.0.23
+#
+# The first parameter is the downloaded MyFaces binary zip file, the second
parameter
+# is the installation base directory of your tomcat installation.
+#
# -----------------------------------------------------------------------------
@@ -36,21 +45,27 @@
# set environment variables
# -----------------------------------------------------------------------------
if [ -z "$CATALINA_HOME" ]; then
- export CATALINA_HOME="$1"
+ export CATALINA_HOME="$2"
fi
if [ -z "$CATALINA_HOME" ]; then
- echo "USAGE: $0 tomcat_install_dir"
+ echo "USAGE: $0 myfaces-core-assembly-x.x.x-bin.zip tomcat_install_dir"
exit -1
fi
if [ ! -f "$CATALINA_HOME/lib/catalina.jar" ]; then
- echo "ERROR: CATALINA_HOME or first parameter doesn't point to a valid
tomcat installation!"
+ echo "ERROR: CATALINA_HOME or second parameter doesn't point to a valid
tomcat installation!"
exit -1
fi
-echo "OWB_INSTALLER: installing Apache OpenWebBeans to $CATALINA_HOME"
+if [ ! -f "$1" ]; then
+ echo "ERROR: MyFaces bundle parameter missing. Download the zip at
http://myfaces.apache.org/download.html"
+ exit -1
+fi
+
+
+echo "OWB_INSTALLER: installing Apache OpenWebBeans and MyFaces to
$CATALINA_HOME"
# -----------------------------------------------------------------------------
# first ersase all leftovers from a previous install
@@ -64,6 +79,13 @@ rm -f "$CATALINA_HOME"/lib/geronimo-anno
rm -f "$CATALINA_HOME"/lib/geronimo-interceptor*.jar
rm -f "$CATALINA_HOME"/lib/geronimo-jcdi*.jar
rm -f "$CATALINA_HOME"/lib/geronimo-atinject*.jar
+rm -f "$CATALINA_HOME"/lib/myfaces-api-*.jar
+rm -f "$CATALINA_HOME"/lib/myfaces-impl-*.jar
+rm -f "$CATALINA_HOME"/lib/lib/commons-beanutils-*.jar
+rm -f "$CATALINA_HOME"/lib/lib/commons-codec-*.jar
+rm -f "$CATALINA_HOME"/lib/lib/commons-collections-*.jar
+rm -f "$CATALINA_HOME"/lib/lib/commons-digester-*.jar
+rm -f "$CATALINA_HOME"/lib/lib/commons-logging-*.jar
# -----------------------------------------------------------------------------
@@ -85,7 +107,25 @@ cp spi/openwebbeans-spi-*.jar "$CATALINA
cp plugins/openwebbeans-web-*.jar "$CATALINA_HOME"/lib/
cp plugins/openwebbeans-el22-*.jar "$CATALINA_HOME"/lib/
cp plugins/openwebbeans-tomcat7-*.jar "$CATALINA_HOME"/lib/
-cp plugins/openwebbeans-jsf-*.jar
"$CATALINA_HOME"/lib/openwebbeans-jsf.jar.disabled
+cp plugins/openwebbeans-jsf-*.jar "$CATALINA_HOME"/lib/
+
+# -----------------------------------------------------------------------------
+# then unzip the myfaces bundle and copy the files to the tomcat lib dir
+# -----------------------------------------------------------------------------
+rm -rf myfaces_zip
+mkdir myfaces_zip
+cd myfaces_zip
+echo "Unzipping MyFaces bundle $1"
+unzip $1
+cd myfaces-core-*
+
+cp lib/myfaces-api-*.jar "$CATALINA_HOME"/lib/
+cp lib/myfaces-impl-*.jar "$CATALINA_HOME"/lib/
+cp lib/commons-beanutils-*.jar "$CATALINA_HOME"/lib/
+cp lib/commons-codec-*.jar "$CATALINA_HOME"/lib/
+cp lib/commons-collections-*.jar "$CATALINA_HOME"/lib/
+cp lib/commons-digester-*.jar "$CATALINA_HOME"/lib/
+cp lib/commons-logging-*.jar "$CATALINA_HOME"/lib/
# -----------------------------------------------------------------------------