Author: julien_viet
Date: 2010-10-18 12:10:12 -0400 (Mon, 18 Oct 2010)
New Revision: 4716
Modified:
portal/trunk/README.txt
portal/trunk/packaging/tomcat/pkg/src/main/resources/tomcat/bin/gatein-dev.sh
portal/trunk/packaging/tomcat/pkg/src/main/resources/tomcat/bin/gatein.sh
portal/trunk/server/tomcat/patch/src/main/tomcat/bin/gatein-dev.sh
portal/trunk/server/tomcat/patch/src/main/tomcat/bin/gatein.sh
Log:
GTNPORTAL-1365 : Shell startup script can be parameterized by a JVM parameter (contributed
by Henri Gomez)
Modified: portal/trunk/README.txt
===================================================================
--- portal/trunk/README.txt 2010-10-18 16:09:45 UTC (rev 4715)
+++ portal/trunk/README.txt 2010-10-18 16:10:12 UTC (rev 4716)
@@ -1,48 +1,50 @@
Welcome to GateIn:
===========================
-This will explain you how to build a package of GateIn with Tomcat or JBoss.
+This will explain you how to build a package of GateIn with Tomcat or JBoss.
*****************
* COMPILATION
*****************
* mvn install
-For example: mvn install
+For example: mvn install
Note: If you run "mvn install" twice in a row without cleaning, one test will
fail. To workaround this issue you will need to delete the test data located
here: component/portal/target/temp/
-**********************
-* MAVEN CONFIGURATION:
-**********************
-
-* edit packaging/profiles.xml and replace the values mentioned so that:
- * ${exo.projects.directory.dependencies} directory contains :
- ** ${exo.projects.app.tomcat.version}/ a clean Tomcat installation, to be used as
packaging template
- ** ${exo.projects.app.jboss.version}/ a clean JBoss installation, to be used as
packaging template
+**********************
+* MAVEN CONFIGURATION:
+**********************
+* edit packaging/profiles.xml and replace the values mentioned so that:
+ * ${exo.projects.directory.dependencies} directory contains :
+ ** ${exo.projects.app.tomcat.version}/ a clean Tomcat installation, to be used as
packaging template
+ ** ${exo.projects.app.jboss.version}/ a clean JBoss installation, to be used as
packaging template
+
* See
http://maven.apache.org/guides/introduction/introduction-to-profiles.html for more
informations
-
-Alternatively you can edit your local settings.xml to add the information
-provided in profiles.xml. It will override what's in the provided file.
-
-*****************
-* PACKAGING:
-*****************
+
+Alternatively you can edit your local settings.xml to add the information
+provided in profiles.xml. It will override what's in the provided file.
-* mvn install -Ppkg-tomcat
+*****************
+* PACKAGING:
+*****************
+
+* mvn install -Ppkg-tomcat
** Creates a Tomcat delivery in packaging/pkg/target/tomcat/
-
-* mvn install -Ppkg-jbossas
+
+* mvn install -Ppkg-jbossas
** Creates a JBossAS delivery in packaging/pkg/target/jboss/
-
-*****************
-* STARTING:
-*****************
-* On Tomcat: go to the tomcat directory (or unzip the archive in your favorite location)
and execute 'bin/gatein.sh start' ('bin/gatein.bat start' on Windows)
-* On JBoss: go to the jboss directory (or unzip the archive in your favorite location)
and execute 'bin/run.sh start' ('bin/run.bat start' on Windows)
-
-* Go to
http://localhost:8080/portal to see the homepage of the portal. That's it.
+*****************
+* STARTING:
+*****************
+* On Tomcat: go to the tomcat directory (or unzip the archive in your favorite location)
and execute 'bin/gatein.sh start' ('bin/gatein.bat start' on Windows)
+* Alternatively you can use the run command to execute GateIn in the current
window 'bin/gatein.sh run' ('bin/gaete.bar run' on Windows)
+* The gatein.sh script can be passed additional arguments between the
gatein.sh script and the tomcat command 'bin/gatein.sh -Dfoo=bar run'
+* On JBoss: go to the jboss directory (or unzip the archive in your favorite location)
and execute 'bin/run.sh start' ('bin/run.bat start' on Windows)
+
+* Go to
http://localhost:8080/portal to see the homepage of the portal. That's it.
+
Modified: portal/trunk/packaging/tomcat/pkg/src/main/resources/tomcat/bin/gatein-dev.sh
===================================================================
---
portal/trunk/packaging/tomcat/pkg/src/main/resources/tomcat/bin/gatein-dev.sh 2010-10-18
16:09:45 UTC (rev 4715)
+++
portal/trunk/packaging/tomcat/pkg/src/main/resources/tomcat/bin/gatein-dev.sh 2010-10-18
16:10:12 UTC (rev 4716)
@@ -24,23 +24,27 @@
# Sets some variables
LOG_OPTS="-Dorg.apache.commons.logging.Log=org.apache.commons.logging.impl.SimpleLog"
SECURITY_OPTS="-Djava.security.auth.login.config=../conf/jaas.conf"
-EXO_OPTS="-Dexo.product.developing=true -Dexo.conf.dir.name=gatein/conf"
+EXO_OPTS="-Dexo.product.developing=true -Dexo.conf.dir.name=gatein/conf
-Djava.awt.headless=true"
EXO_CONFIG_OPTS="-Xms128m -Xmx512m -XX:MaxPermSize=256m
-Dorg.exoplatform.container.configuration.debug"
-
JPDA_TRANSPORT=dt_socket
JPDA_ADDRESS=8000
-
REMOTE_DEBUG="-Xdebug
-Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=n"
-
JMX_AGENT="-Dcom.sun.management.jmxremote"
+GATEIN_OPTS=""
-#For profiling
-#LD_LIBRARY_PATH="/cygdrive/d/tools/YourKit/bin/win32/"
-#PATH="$PATH:$LD_LIBRARY_PATH"
-#export LD_LIBRARY_PATH
-#YOURKIT_PROFILE_OPTION="-agentlib:yjpagent -Djava.awt.headless=true"
+while getopts "D:" OPTION
+do
+ case $OPTION in
+ D)
+ GATEIN_OPTS="$GATEIN_OPTS -D$OPTARG"
+ ;;
+ esac
+done
-JAVA_OPTS="$YOURKIT_PROFILE_OPTION $JAVA_OPTS $LOG_OPTS $SECURITY_OPTS $EXO_OPTS
$EXO_CONFIG_OPTS $REMOTE_DEBUG"
+# skip getopt parms
+shift $((OPTIND-1))
+
+JAVA_OPTS="$JAVA_OPTS $LOG_OPTS $SECURITY_OPTS $EXO_OPTS $EXO_CONFIG_OPTS
$REMOTE_DEBUG $GATEIN_OPTS"
export JAVA_OPTS
# Launches the server
Modified: portal/trunk/packaging/tomcat/pkg/src/main/resources/tomcat/bin/gatein.sh
===================================================================
--- portal/trunk/packaging/tomcat/pkg/src/main/resources/tomcat/bin/gatein.sh 2010-10-18
16:09:45 UTC (rev 4715)
+++ portal/trunk/packaging/tomcat/pkg/src/main/resources/tomcat/bin/gatein.sh 2010-10-18
16:10:12 UTC (rev 4716)
@@ -1,17 +1,17 @@
#!/bin/sh
#
# Copyright (C) 2009 eXo Platform SAS.
-#
+#
# This is free software; you can redistribute it and/or modify it
# under the terms of the GNU Lesser General Public License as
# published by the Free Software Foundation; either version 2.1 of
# the License, or (at your option) any later version.
-#
+#
# This software is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Lesser General Public License for more details.
-#
+#
# You should have received a copy of the GNU Lesser General Public
# License along with this software; if not, write to the Free
# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
@@ -27,9 +27,22 @@
# Sets some variables
LOG_OPTS="-Dorg.apache.commons.logging.Log=org.apache.commons.logging.impl.SimpleLog"
SECURITY_OPTS="-Djava.security.auth.login.config=../conf/jaas.conf"
-EXO_OPTS="-Dexo.product.developing=false -Dexo.conf.dir.name=gatein/conf"
+EXO_OPTS="-Dexo.product.developing=false -Dexo.conf.dir.name=gatein/conf
-Djava.awt.headless=true"
+GATEIN_OPTS=""
-JAVA_OPTS="-Xms128m -Xmx384m -XX:MaxPermSize=192m $JAVA_OPTS $LOG_OPTS
$SECURITY_OPTS $EXO_OPTS"
+while getopts "D:" OPTION
+do
+ case $OPTION in
+ D)
+ GATEIN_OPTS="$GATEIN_OPTS -D$OPTARG"
+ ;;
+ esac
+done
+
+# skip getopt parms
+shift $((OPTIND-1))
+
+JAVA_OPTS="-Xms128m -Xmx384m -XX:MaxPermSize=192m $JAVA_OPTS $LOG_OPTS
$SECURITY_OPTS $EXO_OPTS $GATEIN_OPTS"
export JAVA_OPTS
# Launches the server
Modified: portal/trunk/server/tomcat/patch/src/main/tomcat/bin/gatein-dev.sh
===================================================================
--- portal/trunk/server/tomcat/patch/src/main/tomcat/bin/gatein-dev.sh 2010-10-18 16:09:45
UTC (rev 4715)
+++ portal/trunk/server/tomcat/patch/src/main/tomcat/bin/gatein-dev.sh 2010-10-18 16:10:12
UTC (rev 4716)
@@ -26,21 +26,25 @@
SECURITY_OPTS="-Djava.security.auth.login.config=../conf/jaas.conf"
EXO_OPTS="-Dexo.product.developing=true -Dexo.conf.dir.name=gatein/conf
-Djava.awt.headless=true"
EXO_CONFIG_OPTS="-Xms128m -Xmx512m -XX:MaxPermSize=256m
-Dorg.exoplatform.container.configuration.debug"
-
JPDA_TRANSPORT=dt_socket
JPDA_ADDRESS=8000
-
REMOTE_DEBUG="-Xdebug
-Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=n"
-
JMX_AGENT="-Dcom.sun.management.jmxremote"
+GATEIN_OPTS=""
-#For profiling
-#LD_LIBRARY_PATH="/cygdrive/d/tools/YourKit/bin/win32/"
-#PATH="$PATH:$LD_LIBRARY_PATH"
-#export LD_LIBRARY_PATH
-#YOURKIT_PROFILE_OPTION="-agentlib:yjpagent -Djava.awt.headless=true"
+while getopts "D:" OPTION
+do
+ case $OPTION in
+ D)
+ GATEIN_OPTS="$GATEIN_OPTS -D$OPTARG"
+ ;;
+ esac
+done
-JAVA_OPTS="$YOURKIT_PROFILE_OPTION $JAVA_OPTS $LOG_OPTS $SECURITY_OPTS $EXO_OPTS
$EXO_CONFIG_OPTS $REMOTE_DEBUG"
+# skip getopt parms
+shift $((OPTIND-1))
+
+JAVA_OPTS="$JAVA_OPTS $LOG_OPTS $SECURITY_OPTS $EXO_OPTS $EXO_CONFIG_OPTS
$REMOTE_DEBUG $GATEIN_OPTS"
export JAVA_OPTS
# Launches the server
Modified: portal/trunk/server/tomcat/patch/src/main/tomcat/bin/gatein.sh
===================================================================
--- portal/trunk/server/tomcat/patch/src/main/tomcat/bin/gatein.sh 2010-10-18 16:09:45 UTC
(rev 4715)
+++ portal/trunk/server/tomcat/patch/src/main/tomcat/bin/gatein.sh 2010-10-18 16:10:12 UTC
(rev 4716)
@@ -28,8 +28,21 @@
LOG_OPTS="-Dorg.apache.commons.logging.Log=org.apache.commons.logging.impl.SimpleLog"
SECURITY_OPTS="-Djava.security.auth.login.config=../conf/jaas.conf"
EXO_OPTS="-Dexo.product.developing=false -Dexo.conf.dir.name=gatein/conf
-Djava.awt.headless=true"
+GATEIN_OPTS=""
-JAVA_OPTS="-Xms128m -Xmx384m -XX:MaxPermSize=192m $JAVA_OPTS $LOG_OPTS
$SECURITY_OPTS $EXO_OPTS"
+while getopts "D:" OPTION
+do
+ case $OPTION in
+ D)
+ GATEIN_OPTS="$GATEIN_OPTS -D$OPTARG"
+ ;;
+ esac
+done
+
+# skip getopt parms
+shift $((OPTIND-1))
+
+JAVA_OPTS="-Xms128m -Xmx384m -XX:MaxPermSize=192m $JAVA_OPTS $LOG_OPTS
$SECURITY_OPTS $EXO_OPTS $GATEIN_OPTS"
export JAVA_OPTS
# Launches the server