You are viewing a plain text version of this content. The canonical link for it is here.
Posted to scm@geronimo.apache.org by ha...@apache.org on 2010/11/09 05:43:43 UTC
svn commit: r1032840 - in
/geronimo/server/branches/2.1/assemblies/geronimo-boilerplate-minimal/src/main/underlay/bin:
geronimo.bat geronimo.sh internalLauncherNoExit.bat
Author: hanhongfang
Date: Tue Nov 9 04:43:43 2010
New Revision: 1032840
URL: http://svn.apache.org/viewvc?rev=1032840&view=rev
Log:
GERONIMO-5590 startup script does not consume --help option
Added:
geronimo/server/branches/2.1/assemblies/geronimo-boilerplate-minimal/src/main/underlay/bin/internalLauncherNoExit.bat (with props)
Modified:
geronimo/server/branches/2.1/assemblies/geronimo-boilerplate-minimal/src/main/underlay/bin/geronimo.bat
geronimo/server/branches/2.1/assemblies/geronimo-boilerplate-minimal/src/main/underlay/bin/geronimo.sh
Modified: geronimo/server/branches/2.1/assemblies/geronimo-boilerplate-minimal/src/main/underlay/bin/geronimo.bat
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.1/assemblies/geronimo-boilerplate-minimal/src/main/underlay/bin/geronimo.bat?rev=1032840&r1=1032839&r2=1032840&view=diff
==============================================================================
--- geronimo/server/branches/2.1/assemblies/geronimo-boilerplate-minimal/src/main/underlay/bin/geronimo.bat (original)
+++ geronimo/server/branches/2.1/assemblies/geronimo-boilerplate-minimal/src/main/underlay/bin/geronimo.bat Tue Nov 9 04:43:43 2010
@@ -272,6 +272,16 @@ shift
@REM use long format of startup progress to be consistent with
@REM the unix version of the start processing
set _LONG_OPT=--long
+if ""%1""==""--help"" goto setHelp
+if ""%1""==""-h"" goto setHelp
+if ""%1""==""-help"" goto setHelp
+goto setNonHelp
+:setHelp
+@REM print help information in current window
+set _EXECJAVA=internalLauncherNoExit.bat
+goto execCmd
+:setNonHelp
+@REM if it is not to print help information, open another window
set _EXECJAVA=start "Geronimo" /d"%GERONIMO_HOME%\bin" %GERONIMO_WIN_START_ARGS% internalLauncher.bat
goto execCmd
Modified: geronimo/server/branches/2.1/assemblies/geronimo-boilerplate-minimal/src/main/underlay/bin/geronimo.sh
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.1/assemblies/geronimo-boilerplate-minimal/src/main/underlay/bin/geronimo.sh?rev=1032840&r1=1032839&r2=1032840&view=diff
==============================================================================
--- geronimo/server/branches/2.1/assemblies/geronimo-boilerplate-minimal/src/main/underlay/bin/geronimo.sh (original)
+++ geronimo/server/branches/2.1/assemblies/geronimo-boilerplate-minimal/src/main/underlay/bin/geronimo.sh Tue Nov 9 04:43:43 2010
@@ -316,35 +316,60 @@ elif [ "$1" = "run" ]; then
elif [ "$1" = "start" ] ; then
shift
- touch "$GERONIMO_OUT"
- if [ -f "$JAVA_AGENT_JAR" ]; then
- $START_OS_CMD "$_RUNJAVA" $JAVA_OPTS $GERONIMO_OPTS \
- -javaagent:"$JAVA_AGENT_JAR" \
- -Dorg.apache.geronimo.home.dir="$GERONIMO_HOME" \
- -Djava.endorsed.dirs="$ENDORSED_DIRS" \
- -Djava.ext.dirs="$EXT_DIRS" \
- -Djava.io.tmpdir="$GERONIMO_TMPDIR" \
- -jar "$GERONIMO_HOME"/bin/server.jar $LONG_OPT "$@" \
- >> $GERONIMO_OUT 2>&1 &
- echo ""
- echo "Geronimo started in background. PID: $!"
- if [ ! -z "$GERONIMO_PID" ]; then
- echo $! > $GERONIMO_PID
- fi
+ ISHelp=false
+ case "$1" in
+ --help) ISHelp=true;;
+ -help) ISHelp=true;;
+ -h) ISHelp=true;;
+ esac
+ if $ISHelp; then
+ if [ -f "$JAVA_AGENT_JAR" ]; then
+ exec "$_RUNJAVA" $JAVA_OPTS $GERONIMO_OPTS \
+ -javaagent:"$JAVA_AGENT_JAR" \
+ -Dorg.apache.geronimo.home.dir="$GERONIMO_HOME" \
+ -Djava.endorsed.dirs="$ENDORSED_DIRS" \
+ -Djava.ext.dirs="$EXT_DIRS" \
+ -Djava.io.tmpdir="$GERONIMO_TMPDIR" \
+ -jar "$GERONIMO_HOME"/bin/server.jar $LONG_OPT "$@"
+ else
+ exec "$_RUNJAVA" $JAVA_OPTS $GERONIMO_OPTS \
+ -Dorg.apache.geronimo.home.dir="$GERONIMO_HOME" \
+ -Djava.endorsed.dirs="$ENDORSED_DIRS" \
+ -Djava.ext.dirs="$EXT_DIRS" \
+ -Djava.io.tmpdir="$GERONIMO_TMPDIR" \
+ -jar "$GERONIMO_HOME"/bin/server.jar $LONG_OPT "$@"
+ fi
else
- $START_OS_CMD "$_RUNJAVA" $JAVA_OPTS $GERONIMO_OPTS \
- -Dorg.apache.geronimo.home.dir="$GERONIMO_HOME" \
- -Djava.endorsed.dirs="$ENDORSED_DIRS" \
- -Djava.ext.dirs="$EXT_DIRS" \
- -Djava.io.tmpdir="$GERONIMO_TMPDIR" \
- -jar "$GERONIMO_HOME"/bin/server.jar $LONG_OPT "$@" \
- >> $GERONIMO_OUT 2>&1 &
- echo ""
- echo "Geronimo started in background. PID: $!"
- if [ ! -z "$GERONIMO_PID" ]; then
- echo $! > $GERONIMO_PID
- fi
- fi
+ touch "$GERONIMO_OUT"
+ if [ -f "$JAVA_AGENT_JAR" ]; then
+ $START_OS_CMD "$_RUNJAVA" $JAVA_OPTS $GERONIMO_OPTS \
+ -javaagent:"$JAVA_AGENT_JAR" \
+ -Dorg.apache.geronimo.home.dir="$GERONIMO_HOME" \
+ -Djava.endorsed.dirs="$ENDORSED_DIRS" \
+ -Djava.ext.dirs="$EXT_DIRS" \
+ -Djava.io.tmpdir="$GERONIMO_TMPDIR" \
+ -jar "$GERONIMO_HOME"/bin/server.jar $LONG_OPT "$@" \
+ >> $GERONIMO_OUT 2>&1 &
+ echo ""
+ echo "Geronimo started in background. PID: $!"
+ if [ ! -z "$GERONIMO_PID" ]; then
+ echo $! > $GERONIMO_PID
+ fi
+ else
+ $START_OS_CMD "$_RUNJAVA" $JAVA_OPTS $GERONIMO_OPTS \
+ -Dorg.apache.geronimo.home.dir="$GERONIMO_HOME" \
+ -Djava.endorsed.dirs="$ENDORSED_DIRS" \
+ -Djava.ext.dirs="$EXT_DIRS" \
+ -Djava.io.tmpdir="$GERONIMO_TMPDIR" \
+ -jar "$GERONIMO_HOME"/bin/server.jar $LONG_OPT "$@" \
+ >> $GERONIMO_OUT 2>&1 &
+ echo ""
+ echo "Geronimo started in background. PID: $!"
+ if [ ! -z "$GERONIMO_PID" ]; then
+ echo $! > $GERONIMO_PID
+ fi
+ fi
+ fi
elif [ "$1" = "stop" ] ; then
shift
Added: geronimo/server/branches/2.1/assemblies/geronimo-boilerplate-minimal/src/main/underlay/bin/internalLauncherNoExit.bat
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.1/assemblies/geronimo-boilerplate-minimal/src/main/underlay/bin/internalLauncherNoExit.bat?rev=1032840&view=auto
==============================================================================
--- geronimo/server/branches/2.1/assemblies/geronimo-boilerplate-minimal/src/main/underlay/bin/internalLauncherNoExit.bat (added)
+++ geronimo/server/branches/2.1/assemblies/geronimo-boilerplate-minimal/src/main/underlay/bin/internalLauncherNoExit.bat Tue Nov 9 04:43:43 2010
@@ -0,0 +1,23 @@
+@REM
+@REM Licensed to the Apache Software Foundation (ASF) under one or more
+@REM contributor license agreements. See the NOTICE file distributed with
+@REM this work for additional information regarding copyright ownership.
+@REM The ASF licenses this file to You under the Apache License, Version 2.0
+@REM (the "License"); you may not use this file except in compliance with
+@REM the License. You may obtain a copy of the License at
+@REM
+@REM http://www.apache.org/licenses/LICENSE-2.0
+@REM
+@REM Unless required by applicable law or agreed to in writing, software
+@REM distributed under the License is distributed on an "AS IS" BASIS,
+@REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+@REM See the License for the specific language governing permissions and
+@REM limitations under the License.
+
+@REM ---------------------------------------------------------------------------
+@REM $Rev$ $Date$
+@REM ---------------------------------------------------------------------------
+@if "%GERONIMO_BATCH_ECHO%" == "on" echo on
+@if not "%GERONIMO_BATCH_ECHO%" == "on" echo off
+
+%_RUNJAVA% %JAVA_OPTS% %GERONIMO_OPTS% %JAVA_AGENT_OPTS% -Djava.endorsed.dirs="%GERONIMO_HOME%\lib\endorsed;%JRE_HOME%\lib\endorsed" -Djava.ext.dirs="%GERONIMO_HOME%\lib\ext;%JRE_HOME%\lib\ext" -Dorg.apache.geronimo.home.dir="%GERONIMO_HOME%" -Djava.io.tmpdir="%GERONIMO_TMPDIR%" -jar %_JARFILE% %_LONG_OPT% %CMD_LINE_ARGS%
Propchange: geronimo/server/branches/2.1/assemblies/geronimo-boilerplate-minimal/src/main/underlay/bin/internalLauncherNoExit.bat
------------------------------------------------------------------------------
svn:eol-style = CRLF
Propchange: geronimo/server/branches/2.1/assemblies/geronimo-boilerplate-minimal/src/main/underlay/bin/internalLauncherNoExit.bat
------------------------------------------------------------------------------
svn:executable = *
Propchange: geronimo/server/branches/2.1/assemblies/geronimo-boilerplate-minimal/src/main/underlay/bin/internalLauncherNoExit.bat
------------------------------------------------------------------------------
svn:mime-type = text/plain