geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ga...@apache.org
Subject svn commit: r935712 [2/2] - in /geronimo/server/trunk/framework/configs/karaf-framework/src/main: distribution/unix-shell/bin/ distribution/windows-text/bin/ filtered-resources/bin/
Date Mon, 19 Apr 2010 19:41:37 GMT
Modified: geronimo/server/trunk/framework/configs/karaf-framework/src/main/distribution/windows-text/bin/client.bat
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/configs/karaf-framework/src/main/distribution/windows-text/bin/client.bat?rev=935712&r1=935711&r2=935712&view=diff
==============================================================================
--- geronimo/server/trunk/framework/configs/karaf-framework/src/main/distribution/windows-text/bin/client.bat (original)
+++ geronimo/server/trunk/framework/configs/karaf-framework/src/main/distribution/windows-text/bin/client.bat Mon Apr 19 19:41:37 2010
@@ -1,166 +1,175 @@
-@echo off
-rem
-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 
-rem $Id: karaf.bat 979 2005-11-30 22:50:55Z bsnyder $
-rem 
-
-if not "%ECHO%" == "" echo %ECHO%
-
-setlocal
-set DIRNAME=%~dp0%
-set PROGNAME=%~nx0%
-set ARGS=%*
+@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: 575171 $ $Date: 2007-09-13 01:15:48 -0400 (Thu, 13 Sep 2007) $
+@REM --------------------------------------------------------------------
+
+@REM ---------------------------------------------------------------------------
+@REM Client batch file for Geronimo
+@REM
+@REM You should not have to edit this file.  If you wish to have
+@REM environment variables set each time you run this batch file
+@REM refer to the information on the setenv.bat file below.
+@REM
+@REM Invocation Syntax:
+@REM
+@REM   client [general options] app client module name [app client arguments]
+@REM
+@REM   For detailed usage information, just run client without
+@REM   arguments.
+@REM
+@REM Environment Variable Prequisites
+@REM
+@REM   GERONIMO_HOME   May point at your Geronimo top-level directory.
+@REM                   If not specified, this batch file will attempt to
+@REM                   discover it relative to the location of this file.
+@REM
+@REM   GERONIMO_OPTS   (Optional) Java runtime options (in addition to
+@REM                   those set in JAVA_OPTS).
+@REM
+@REM   GERONIMO_TMPDIR (Optional) Directory path location of temporary directory
+@REM                   the JVM should use (java.io.tmpdir).  Defaults to
+@REM                   var\temp (resolved to server instance directory).
+@REM
+@REM   JAVA_HOME       Points to your Java Development Kit installation.
+@REM                   JAVA_HOME doesn't need to be set if JRE_HOME is set.
+@REM                   It is mandatory either JAVA_HOME or JRE_HOME are set.
+@REM
+@REM   JRE_HOME        (Optional) Points to your Java Runtime Environment
+@REM                   Set this if you wish to run Geronimo using the JRE
+@REM                   instead of the JDK.
+@REM                   Defaults to JAVA_HOME if empty.
+@REM                   It is mandatory either JAVA_HOME or JRE_HOME are set.
+@REM
+@REM   JAVA_OPTS       (Optional) Java runtime options used.
+@REM                   Also see the GERONIMO_OPTS environment variable.
+@REM
+@REM Troubleshooting execution of this batch file:
+@REM
+@REM   GERONIMO_BATCH_ECHO  (Optional) Environment variable that when set to
+@REM                        "on" results in batch commands being echoed.
+@REM
+@REM   GERONIMO_BATCH_PAUSE (Optional) Environment variable that when set to
+@REM                        "on" results in each batch file to pause at the
+@REM                        end of execution
+@REM
+@REM   GERONIMO_ENV_INFO    (Optional) Environment variable that when set to
+@REM                        "on" (the default) outputs the values of
+@REM                        GERONIMO_HOME, GERONIMO_TMPDIR,
+@REM                        JAVA_HOME and JRE_HOME before the command is
+@REM                        issued. Set to "off" if you do not want this
+@REM                        information displayed.
+@REM
+@REM Batch files called by this batch file:
+@REM
+@REM   %GERONIMO_HOME%\bin\setenv.bat
+@REM                   (Optional) This batch file is called if it is present.
+@REM                   Its contents may set one or more of the above environment
+@REM                   variables. It is preferable (to simplify migration to
+@REM                   future Geronimo releases) to set environment variables
+@REM                   in this file rather than modifying Geronimo's batch files.
+@REM
+@REM   %GERONIMO_HOME%\bin\setjavaenv.bat
+@REM                   This batch file is called to set environment variables
+@REM                   relating to the java or jdb exe file to call.
+@REM                   This file should not need to be modified.
+@REM
+@REM Exit Codes:
+@REM
+@REM  0        - Success
+@REM  Non-zero - Error
+@REM ---------------------------------------------------------------------------
+@if "%GERONIMO_BATCH_ECHO%" == "on"  echo on
+@if not "%GERONIMO_BATCH_ECHO%" == "on"  echo off
+
+@setlocal enableextensions
+
+if not "%GERONIMO_HOME%" == "" goto resolveHome
+@REM %~dp0 is expanded pathname of the current script
+set GERONIMO_HOME=%~dp0..
+
+@REM resolve .. and remove any trailing slashes
+:resolveHome
+set CURRENT_DIR=%cd%
+cd /d %GERONIMO_HOME%
+set GERONIMO_HOME=%cd%
+cd /d %CURRENT_DIR%
+
+:gotHome
+if exist "%GERONIMO_HOME%\bin\client.bat" goto okHome
+echo The GERONIMO_HOME environment variable is not defined correctly
+echo This environment variable is needed to run this program
+cmd /c exit /b 1
+goto end
+:okHome
+
+@REM Get standard environment variables
+@REM Users can optionally create this file to set environment variables.
+if exist "%GERONIMO_HOME%\bin\setenv.bat" call "%GERONIMO_HOME%\bin\setenv.bat"
+if not %errorlevel% == 0 goto end
+
+@REM Get standard Java environment variables (based upon Tomcat's setclasspath.bat
+@REM but renamed since Client's classpath is set in the JAR manifest)
+if exist "%GERONIMO_HOME%\bin\setjavaenv.bat" goto okSetJavaEnv
+echo Cannot find %GERONIMO_HOME%\bin\setjavaenv.bat
+echo This file is needed to run this program
+cmd /c exit /b 1
+goto end
+:okSetJavaEnv
+set BASEDIR=%GERONIMO_HOME%
+call "%GERONIMO_HOME%\bin\setJavaEnv.bat"
+if not %errorlevel% == 0 goto end
+
+if not "%GERONIMO_TMPDIR%" == "" goto gotTmpdir
+set GERONIMO_TMPDIR=var\temp
+:gotTmpdir
 
-title Karaf
-
-goto BEGIN
-
-:warn
-    echo %PROGNAME%: %*
-goto :EOF
-
-:BEGIN
-
-rem # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
-
-if not "%KARAF_HOME%" == "" (
-    call :warn Ignoring predefined value for KARAF_HOME
-)
-set KARAF_HOME=%DIRNAME%..
-if not exist "%KARAF_HOME%" (
-    call :warn KARAF_HOME is not valid: %KARAF_HOME%
-    goto END
-)
-
-if not "%KARAF_BASE%" == "" (
-    if not exist "%KARAF_BASE%" (
-       call :warn KARAF_BASE is not valid: %KARAF_BASE%
-       goto END
-    )
-)
-if "%KARAF_BASE%" == "" (
-  set KARAF_BASE=%KARAF_HOME%
-)
-
-set LOCAL_CLASSPATH=%CLASSPATH%
-set DEFAULT_JAVA_OPTS=-server -Xmx512M -Dderby.system.home="%KARAF_BASE%\data\derby" -Dderby.storage.fileSyncTransactionLog=true -Dcom.sun.management.jmxremote
-set CLASSPATH=%LOCAL_CLASSPATH%;%KARAF_BASE%\conf
-set DEFAULT_JAVA_DEBUG_OPTS=-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
-
-if "%LOCAL_CLASSPATH%" == "" goto :KARAF_CLASSPATH_EMPTY
-    set CLASSPATH=%LOCAL_CLASSPATH%;%KARAF_BASE%\conf
-    goto :KARAF_CLASSPATH_END
-:KARAF_CLASSPATH_EMPTY
-    set CLASSPATH=%KARAF_BASE%\conf
-:KARAF_CLASSPATH_END
-
-rem Setup Karaf Home
-if exist "%KARAF_HOME%\conf\karaf-rc.cmd" call %KARAF_HOME%\conf\karaf-rc.cmd
-if exist "%HOME%\karaf-rc.cmd" call %HOME%\karaf-rc.cmd
-
-rem Support for loading native libraries
-set PATH=%PATH%;%KARAF_BASE%\lib;%KARAF_HOME%\lib
-
-rem Setup the Java Virtual Machine
-if not "%JAVA%" == "" goto :Check_JAVA_END
-    set JAVA=java
-    if "%JAVA_HOME%" == "" call :warn JAVA_HOME not set; results may vary
-    if not "%JAVA_HOME%" == "" set JAVA=%JAVA_HOME%\bin\java
-    if not exist "%JAVA_HOME%" (
-        call :warn JAVA_HOME is not valid: "%JAVA_HOME%"
-        goto END
-    )
-:Check_JAVA_END
-
-if "%JAVA_OPTS%" == "" set JAVA_OPTS=%DEFAULT_JAVA_OPTS%
-
-if "%KARAF_DEBUG%" == "" goto :KARAF_DEBUG_END
-    rem Use the defaults if JAVA_DEBUG_OPTS was not set
-    if "%JAVA_DEBUG_OPTS%" == "" set JAVA_DEBUG_OPTS=%DEFAULT_JAVA_DEBUG_OPTS%
-    
-    set "JAVA_OPTS=%JAVA_DEBUG_OPTS% %JAVA_OPTS%"
-    call :warn Enabling Java debug options: %JAVA_DEBUG_OPTS%
-:KARAF_DEBUG_END
-
-if "%KARAF_PROFILER%" == "" goto :KARAF_PROFILER_END
-    set KARAF_PROFILER_SCRIPT=%KARAF_HOME%\conf\profiler\%KARAF_PROFILER%.cmd
-    
-    if exist "%KARAF_PROFILER_SCRIPT%" goto :KARAF_PROFILER_END
-    call :warn Missing configuration for profiler '%KARAF_PROFILER%': %KARAF_PROFILER_SCRIPT%
-    goto END
-:KARAF_PROFILER_END
-
-rem Setup the classpath
-pushd "%KARAF_HOME%\lib"
+@REM Setup the classpath
+pushd "%GERONIMO_HOME%\lib"
 for %%G in (*.*) do call:APPEND_TO_CLASSPATH %%G
 popd
 goto CLASSPATH_END
 
-: APPEND_TO_CLASSPATH
+:APPEND_TO_CLASSPATH
 set filename=%~1
 set suffix=%filename:~-4%
-if %suffix% equ .jar set CLASSPATH=%CLASSPATH%;%KARAF_HOME%\lib\%filename%
+if %suffix% equ .jar set CLASSPATH=%CLASSPATH%;%GERONIMO_HOME%\lib\%filename%
 goto :EOF
 
 :CLASSPATH_END
 
-rem Execute the JVM or the load the profiler
-if "%KARAF_PROFILER%" == "" goto :RUN
-    rem Execute the profiler if it has been configured
-    call :warn Loading profiler script: %KARAF_PROFILER_SCRIPT%
-    call %KARAF_PROFILER_SCRIPT%
-
-:RUN
-    SET OPTS=-Dkaraf.startLocalConsole=false -Dkaraf.startRemoteShell=true
-    SET SHIFT=false
-    if "%1" == "console" goto :EXECUTE_CONSOLE
-    if "%1" == "server" goto :EXECUTE_SERVER
-    if "%1" == "client" goto :EXECUTE_CLIENT
-    goto :EXECUTE
-
-:EXECUTE_CONSOLE
-    SET SHIFT=true
-    goto :EXECUTE    
-
-:EXECUTE_SERVER
-    SET OPTS=-Dkaraf.startLocalConsole=false -Dkaraf.startRemoteShell=true
-    SET SHIFT=true
-    goto :EXECUTE
-
-:EXECUTE_CLIENT
-    SET OPTS=-Dkaraf.startLocalConsole=true -Dkaraf.startRemoteShell=false
-    SET SHIFT=true
-    goto :EXECUTE
-
-:EXECUTE
-    if "%SHIFT%" == "true" SET ARGS=%2 %3 %4 %5 %6 %7 %8
-    if not "%SHIFT%" == "true" SET ARGS=%1 %2 %3 %4 %5 %6 %7 %8    
-    rem Execute the Java Virtual Machine
-    "%JAVA%" %JAVA_OPTS% %OPTS% -classpath "%CLASSPATH%" -Dorg.apache.geronimo.home.dir="%KARAF_HOME%" -Dkaraf.home="%KARAF_HOME%" -Dkaraf.base="%KARAF_BASE%" -Djava.util.logging.config.file="%KARAF_BASE%\etc\java.util.logging.properties" org.apache.geronimo.cli.client.ClientCLI %ARGS%
-
-rem # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
-
-:END
-
-endlocal
-
-if not "%PAUSE%" == "" pause
-
-:END_NO_PAUSE
-
+@REM ----- Execute The Requested Command ---------------------------------------
+@if "%GERONIMO_ENV_INFO%" == "off" goto skipEnvInfo
+echo Using GERONIMO_HOME:   %GERONIMO_HOME%
+echo Using GERONIMO_TMPDIR: %GERONIMO_TMPDIR%
+if "%_REQUIRE_JDK%" == "1" echo Using JAVA_HOME:       %JAVA_HOME%
+if "%_REQUIRE_JDK%" == "0" echo Using JRE_HOME:        %JRE_HOME%
+
+:skipEnvInfo
+
+@REM Capture any passed in arguments
+set CMD_LINE_ARGS=%*
+
+%_RUNJAVA% %JAVA_OPTS% %GERONIMO_OPTS% -Dkaraf.startLocalConsole=false -Dkaraf.startRemoteShell=false -Dorg.apache.geronimo.home.dir="%GERONIMO_HOME%"  -Dkaraf.home="%GERONIMO_HOME%" -Dkaraf.base="%GERONIMO_HOME%" -Djava.util.logging.config.file="%GERONIMO_HOME%\etc\java.util.logging.properties" -Djava.endorsed.dirs="%GERONIMO_HOME%\lib\endorsed;%JRE_HOME%\lib\endorsed" -Djava.ext.dirs="%GERONIMO_HOME%\lib\ext;%JRE_HOME%\lib\ext" -Djava.io.tmpdir="%GERONIMO_TMPDIR%" -classpath "%CLASSPATH%" org.apache.geronimo.cli.client.ClientCLI %CMD_LINE_ARGS%
+goto end
+
+:end
+echo.
+@REM pause the batch file if GERONIMO_BATCH_PAUSE is set to 'on'
+if "%GERONIMO_BATCH_PAUSE%" == "on" pause
+@endlocal
+cmd /c exit /b %errorlevel%

Modified: geronimo/server/trunk/framework/configs/karaf-framework/src/main/distribution/windows-text/bin/deploy.bat
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/configs/karaf-framework/src/main/distribution/windows-text/bin/deploy.bat?rev=935712&r1=935711&r2=935712&view=diff
==============================================================================
--- geronimo/server/trunk/framework/configs/karaf-framework/src/main/distribution/windows-text/bin/deploy.bat (original)
+++ geronimo/server/trunk/framework/configs/karaf-framework/src/main/distribution/windows-text/bin/deploy.bat Mon Apr 19 19:41:37 2010
@@ -1,166 +1,175 @@
-@echo off
-rem
-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 
-rem $Id: karaf.bat 979 2005-11-30 22:50:55Z bsnyder $
-rem 
-
-if not "%ECHO%" == "" echo %ECHO%
-
-setlocal
-set DIRNAME=%~dp0%
-set PROGNAME=%~nx0%
-set ARGS=%*
+@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: 899564 $ $Date: 2010-01-15 03:38:51 -0500 (Fri, 15 Jan 2010) $
+@REM --------------------------------------------------------------------
+
+@REM ---------------------------------------------------------------------------
+@REM Deploy batch file for Geronimo
+@REM
+@REM You should not have to edit this file.  If you wish to have
+@REM environment variables set each time you run this batch file
+@REM refer to the information on the setenv.bat file below.
+@REM
+@REM Invocation Syntax:
+@REM
+@REM   deploy [general options] command [command options]
+@REM
+@REM   For detailed usage information, just run deploy without
+@REM   arguments.
+@REM
+@REM Environment Variable Prequisites
+@REM
+@REM   GERONIMO_HOME   May point at your Geronimo top-level directory.
+@REM                   If not specified, this batch file will attempt to
+@REM                   discover it relative to the location of this file.
+@REM
+@REM   GERONIMO_OPTS   (Optional) Java runtime options (in addition to
+@REM                   those set in JAVA_OPTS).
+@REM
+@REM   GERONIMO_TMPDIR (Optional) Directory path location of temporary directory
+@REM                   the JVM should use (java.io.tmpdir).  Defaults to
+@REM                   var\temp (resolved to server instance directory).
+@REM
+@REM   JAVA_HOME       Points to your Java Development Kit installation.
+@REM                   JAVA_HOME doesn't need to be set if JRE_HOME is set.
+@REM                   It is mandatory either JAVA_HOME or JRE_HOME are set.
+@REM
+@REM   JRE_HOME        (Optional) Points to your Java Runtime Environment
+@REM                   Set this if you wish to run Geronimo using the JRE
+@REM                   instead of the JDK.
+@REM                   Defaults to JAVA_HOME if empty.
+@REM                   It is mandatory either JAVA_HOME or JRE_HOME are set.
+@REM
+@REM   JAVA_OPTS       (Optional) Java runtime options used.
+@REM                   Also see the GERONIMO_OPTS environment variable.
+@REM
+@REM Troubleshooting execution of this batch file:
+@REM
+@REM   GERONIMO_BATCH_ECHO  (Optional) Environment variable that when set to
+@REM                        "on" results in batch commands being echoed.
+@REM
+@REM   GERONIMO_BATCH_PAUSE (Optional) Environment variable that when set to
+@REM                        "on" results in each batch file to pause at the
+@REM                        end of execution
+@REM
+@REM   GERONIMO_ENV_INFO    (Optional) Environment variable that when set to
+@REM                        "on" (the default) outputs the values of
+@REM                        GERONIMO_HOME, GERONIMO_TMPDIR,
+@REM                        JAVA_HOME and JRE_HOME before the command is
+@REM                        issued. Set to "off" if you do not want this
+@REM                        information displayed.
+@REM
+@REM Batch files called by this batch file:
+@REM
+@REM   %GERONIMO_HOME%\bin\setenv.bat
+@REM                   (Optional) This batch file is called if it is present.
+@REM                   Its contents may set one or more of the above environment
+@REM                   variables. It is preferable (to simplify migration to
+@REM                   future Geronimo releases) to set environment variables
+@REM                   in this file rather than modifying Geronimo's batch files.
+@REM
+@REM   %GERONIMO_HOME%\bin\setjavaenv.bat
+@REM                   This batch file is called to set environment variables
+@REM                   relating to the java or jdb exe file to call.
+@REM                   This file should not need to be modified.
+@REM
+@REM Exit Codes:
+@REM
+@REM  0        - Success
+@REM  Non-zero - Error
+@REM ---------------------------------------------------------------------------
+@if "%GERONIMO_BATCH_ECHO%" == "on"  echo on
+@if not "%GERONIMO_BATCH_ECHO%" == "on"  echo off
+
+@setlocal enableextensions
+
+if not "%GERONIMO_HOME%" == "" goto resolveHome
+@REM %~dp0 is expanded pathname of the current script
+set GERONIMO_HOME=%~dp0..
+
+@REM resolve .. and remove any trailing slashes
+:resolveHome
+set CURRENT_DIR=%cd%
+cd /d %GERONIMO_HOME%
+set GERONIMO_HOME=%cd%
+cd /d %CURRENT_DIR%
+
+:gotHome
+if exist "%GERONIMO_HOME%\bin\deploy.bat" goto okHome
+echo The GERONIMO_HOME environment variable is not defined correctly
+echo This environment variable is needed to run this program
+cmd /c exit /b 1
+goto end
+:okHome
+
+@REM Get standard environment variables
+@REM Users can optionally create this file to set environment variables.
+if exist "%GERONIMO_HOME%\bin\setenv.bat" call "%GERONIMO_HOME%\bin\setenv.bat"
+if not %errorlevel% == 0 goto end
+
+@REM Get standard Java environment variables (based upon Tomcat's setclasspath.bat
+@REM but renamed since Deployer's classpath is set in the JAR manifest)
+if exist "%GERONIMO_HOME%\bin\setjavaenv.bat" goto okSetJavaEnv
+echo Cannot find %GERONIMO_HOME%\bin\setjavaenv.bat
+echo This file is needed to run this program
+cmd /c exit /b 1
+goto end
+:okSetJavaEnv
+set BASEDIR=%GERONIMO_HOME%
+call "%GERONIMO_HOME%\bin\setJavaEnv.bat"
+if not %errorlevel% == 0 goto end
+
+if not "%GERONIMO_TMPDIR%" == "" goto gotTmpdir
+set GERONIMO_TMPDIR=var\temp
+:gotTmpdir
 
-title Karaf
-
-goto BEGIN
-
-:warn
-    echo %PROGNAME%: %*
-goto :EOF
-
-:BEGIN
-
-rem # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
-
-if not "%KARAF_HOME%" == "" (
-    call :warn Ignoring predefined value for KARAF_HOME
-)
-set KARAF_HOME=%DIRNAME%..
-if not exist "%KARAF_HOME%" (
-    call :warn KARAF_HOME is not valid: %KARAF_HOME%
-    goto END
-)
-
-if not "%KARAF_BASE%" == "" (
-    if not exist "%KARAF_BASE%" (
-       call :warn KARAF_BASE is not valid: %KARAF_BASE%
-       goto END
-    )
-)
-if "%KARAF_BASE%" == "" (
-  set KARAF_BASE=%KARAF_HOME%
-)
-
-set LOCAL_CLASSPATH=%CLASSPATH%
-set DEFAULT_JAVA_OPTS=-server -Xmx512M -Dderby.system.home="%KARAF_BASE%\data\derby" -Dderby.storage.fileSyncTransactionLog=true -Dcom.sun.management.jmxremote
-set CLASSPATH=%LOCAL_CLASSPATH%;%KARAF_BASE%\conf
-set DEFAULT_JAVA_DEBUG_OPTS=-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
-
-if "%LOCAL_CLASSPATH%" == "" goto :KARAF_CLASSPATH_EMPTY
-    set CLASSPATH=%LOCAL_CLASSPATH%;%KARAF_BASE%\conf
-    goto :KARAF_CLASSPATH_END
-:KARAF_CLASSPATH_EMPTY
-    set CLASSPATH=%KARAF_BASE%\conf
-:KARAF_CLASSPATH_END
-
-rem Setup Karaf Home
-if exist "%KARAF_HOME%\conf\karaf-rc.cmd" call %KARAF_HOME%\conf\karaf-rc.cmd
-if exist "%HOME%\karaf-rc.cmd" call %HOME%\karaf-rc.cmd
-
-rem Support for loading native libraries
-set PATH=%PATH%;%KARAF_BASE%\lib;%KARAF_HOME%\lib
-
-rem Setup the Java Virtual Machine
-if not "%JAVA%" == "" goto :Check_JAVA_END
-    set JAVA=java
-    if "%JAVA_HOME%" == "" call :warn JAVA_HOME not set; results may vary
-    if not "%JAVA_HOME%" == "" set JAVA=%JAVA_HOME%\bin\java
-    if not exist "%JAVA_HOME%" (
-        call :warn JAVA_HOME is not valid: "%JAVA_HOME%"
-        goto END
-    )
-:Check_JAVA_END
-
-if "%JAVA_OPTS%" == "" set JAVA_OPTS=%DEFAULT_JAVA_OPTS%
-
-if "%KARAF_DEBUG%" == "" goto :KARAF_DEBUG_END
-    rem Use the defaults if JAVA_DEBUG_OPTS was not set
-    if "%JAVA_DEBUG_OPTS%" == "" set JAVA_DEBUG_OPTS=%DEFAULT_JAVA_DEBUG_OPTS%
-    
-    set "JAVA_OPTS=%JAVA_DEBUG_OPTS% %JAVA_OPTS%"
-    call :warn Enabling Java debug options: %JAVA_DEBUG_OPTS%
-:KARAF_DEBUG_END
-
-if "%KARAF_PROFILER%" == "" goto :KARAF_PROFILER_END
-    set KARAF_PROFILER_SCRIPT=%KARAF_HOME%\conf\profiler\%KARAF_PROFILER%.cmd
-    
-    if exist "%KARAF_PROFILER_SCRIPT%" goto :KARAF_PROFILER_END
-    call :warn Missing configuration for profiler '%KARAF_PROFILER%': %KARAF_PROFILER_SCRIPT%
-    goto END
-:KARAF_PROFILER_END
-
-rem Setup the classpath
-pushd "%KARAF_HOME%\lib"
+@REM Setup the classpath
+pushd "%GERONIMO_HOME%\lib"
 for %%G in (*.*) do call:APPEND_TO_CLASSPATH %%G
 popd
 goto CLASSPATH_END
 
-: APPEND_TO_CLASSPATH
+:APPEND_TO_CLASSPATH
 set filename=%~1
 set suffix=%filename:~-4%
-if %suffix% equ .jar set CLASSPATH=%CLASSPATH%;%KARAF_HOME%\lib\%filename%
+if %suffix% equ .jar set CLASSPATH=%CLASSPATH%;%GERONIMO_HOME%\lib\%filename%
 goto :EOF
 
 :CLASSPATH_END
 
-rem Execute the JVM or the load the profiler
-if "%KARAF_PROFILER%" == "" goto :RUN
-    rem Execute the profiler if it has been configured
-    call :warn Loading profiler script: %KARAF_PROFILER_SCRIPT%
-    call %KARAF_PROFILER_SCRIPT%
-
-:RUN
-    SET OPTS=-Dkaraf.startLocalConsole=false -Dkaraf.startRemoteShell=true
-    SET SHIFT=false
-    if "%1" == "console" goto :EXECUTE_CONSOLE
-    if "%1" == "server" goto :EXECUTE_SERVER
-    if "%1" == "client" goto :EXECUTE_CLIENT
-    goto :EXECUTE
-
-:EXECUTE_CONSOLE
-    SET SHIFT=true
-    goto :EXECUTE    
-
-:EXECUTE_SERVER
-    SET OPTS=-Dkaraf.startLocalConsole=false -Dkaraf.startRemoteShell=true
-    SET SHIFT=true
-    goto :EXECUTE
-
-:EXECUTE_CLIENT
-    SET OPTS=-Dkaraf.startLocalConsole=true -Dkaraf.startRemoteShell=false
-    SET SHIFT=true
-    goto :EXECUTE
-
-:EXECUTE
-    if "%SHIFT%" == "true" SET ARGS=%2 %3 %4 %5 %6 %7 %8
-    if not "%SHIFT%" == "true" SET ARGS=%1 %2 %3 %4 %5 %6 %7 %8    
-    rem Execute the Java Virtual Machine
-    "%JAVA%" %JAVA_OPTS% %OPTS% -classpath "%CLASSPATH%" -Dorg.apache.geronimo.home.dir="%KARAF_HOME%" -Dkaraf.home="%KARAF_HOME%" -Dkaraf.base="%KARAF_BASE%" -Djava.util.logging.config.file="%KARAF_BASE%\etc\java.util.logging.properties" org.apache.geronimo.cli.deployer.DeployerCLI %ARGS%
-
-rem # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
-
-:END
-
-endlocal
-
-if not "%PAUSE%" == "" pause
-
-:END_NO_PAUSE
-
+@REM ----- Execute The Requested Command ---------------------------------------
+@if "%GERONIMO_ENV_INFO%" == "off" goto skipEnvInfo
+echo Using GERONIMO_HOME:   %GERONIMO_HOME%
+echo Using GERONIMO_TMPDIR: %GERONIMO_TMPDIR%
+if "%_REQUIRE_JDK%" == "1" echo Using JAVA_HOME:       %JAVA_HOME%
+if "%_REQUIRE_JDK%" == "0" echo Using JRE_HOME:        %JRE_HOME%
+
+:skipEnvInfo
+
+@REM Capture any passed in arguments
+set CMD_LINE_ARGS=%*
+
+%_RUNJAVA% %JAVA_OPTS% %GERONIMO_OPTS% -Dkaraf.startLocalConsole=false -Dkaraf.startRemoteShell=false -Dorg.apache.geronimo.home.dir="%GERONIMO_HOME%"  -Dkaraf.home="%GERONIMO_HOME%" -Dkaraf.base="%GERONIMO_HOME%" -Djava.util.logging.config.file="%GERONIMO_HOME%\etc\java.util.logging.properties" -Djava.endorsed.dirs="%GERONIMO_HOME%\lib\endorsed;%JRE_HOME%\lib\endorsed" -Djava.ext.dirs="%GERONIMO_HOME%\lib\ext;%JRE_HOME%\lib\ext" -Djava.io.tmpdir="%GERONIMO_TMPDIR%" -classpath "%CLASSPATH%" org.apache.geronimo.cli.deployer.DeployerCLI %CMD_LINE_ARGS%
+goto end
+
+:end
+echo.
+@REM pause the batch file if GERONIMO_BATCH_PAUSE is set to 'on'
+if "%GERONIMO_BATCH_PAUSE%" == "on" pause
+@endlocal
+cmd /c exit /b %errorlevel%

Modified: geronimo/server/trunk/framework/configs/karaf-framework/src/main/distribution/windows-text/bin/geronimo.bat
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/configs/karaf-framework/src/main/distribution/windows-text/bin/geronimo.bat?rev=935712&r1=935711&r2=935712&view=diff
==============================================================================
--- geronimo/server/trunk/framework/configs/karaf-framework/src/main/distribution/windows-text/bin/geronimo.bat (original)
+++ geronimo/server/trunk/framework/configs/karaf-framework/src/main/distribution/windows-text/bin/geronimo.bat Mon Apr 19 19:41:37 2010
@@ -1,166 +1,335 @@
-@echo off
-rem
-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 
-rem $Id: karaf.bat 979 2005-11-30 22:50:55Z bsnyder $
-rem 
-
-if not "%ECHO%" == "" echo %ECHO%
-
-setlocal
-set DIRNAME=%~dp0%
-set PROGNAME=%~nx0%
-set ARGS=%*
+@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: 931017 $ $Date: 2010-04-06 00:58:31 -0400 (Tue, 06 Apr 2010) $
+@REM --------------------------------------------------------------------
+
+@REM ---------------------------------------------------------------------------
+@REM Start/Stop Batch file for Geronimo
+@REM
+@REM This batch file is based upon Tomcat's catalina.bat file to enable
+@REM those familiar with Tomcat to quickly get started with Geronimo.
+@REM
+@REM This batch file can be used directly instead of startup.bat and
+@REM shutdown.bat as they call this batch file anyway.
+@REM
+@REM You should not have to edit this file.  If you wish to have environment
+@REM variables set each time you run this batch file refer to the information
+@REM on the setenv.bat file below.
+@REM
+@REM Invocation Syntax:
+@REM
+@REM   geronimo command [geronimo_args]
+@REM
+@REM   For detailed usage information, just run geronimo.bat without any
+@REM   arguments.
+@REM
+@REM Environment Variable Prequisites:
+@REM
+@REM   GERONIMO_HOME   May point at your Geronimo top-level directory.
+@REM                   If not specified, this batch file will attempt to
+@REM                   discover it relative to the location of this file.
+@REM
+@REM   GERONIMO_OPTS   (Optional) Java runtime options (in addition to
+@REM                   those set in JAVA_OPTS) used when the "start",
+@REM                   "stop", or "run" command is executed.
+@REM
+@REM   GERONIMO_TMPDIR (Optional) Directory path location of temporary directory
+@REM                   the JVM should use (java.io.tmpdir).  Defaults to
+@REM                   var\temp (resolved to server instance directory).
+@REM
+@REM   GERONIMO_WIN_START_ARGS  (Optional) additional arguments to the Windows
+@REM                            START command when the "start" command
+@REM                            is executed. E.G, you could set this to /MIN
+@REM                            to start Geronimo in a minimized window.
+@REM
+@REM   JAVA_HOME       Points to your Java Development Kit installation.
+@REM                   JAVA_HOME doesn't need to be set if JRE_HOME is set
+@REM                   unless you use the "debug" command.
+@REM                   It is mandatory either JAVA_HOME or JRE_HOME are set.
+@REM
+@REM   JRE_HOME        (Optional) Points to your Java Runtime Environment
+@REM                   Set this if you wish to run Geronimo using the JRE
+@REM                   instead of the JDK (except for the "debug" command).
+@REM                   Defaults to JAVA_HOME if empty.
+@REM                   It is mandatory either JAVA_HOME or JRE_HOME are set.
+@REM
+@REM   JAVA_OPTS       (Optional) Java runtime options used when the "start",
+@REM                   "stop", or "run" command is executed.
+@REM                   Also see the GERONIMO_OPTS environment variable.
+@REM
+@REM   JDB_SRCPATH     (Optional) The Source Path to be used by jdb debugger.
+@REM                   Defaults to %GERONIMO_HOME%\src
+@REM
+@REM   JPDA_ADDRESS    (Optional) Java runtime options used when the "jpda start"
+@REM                   command is executed. The default is "8000".
+@REM
+@REM   JPDA_OPTS       (Optional) JPDA command line options.
+@REM                   Only set this if you need to use some unusual JPDA
+@REM                   command line options.  This overrides the use of the
+@REM                   other JPDA_* environment variables.
+@REM                   Defaults to JPDA command line options contructed from
+@REM                   the JPDA_ADDRESS, JPDA_SUSPEND and JPDA_TRANSPORT
+@REM                   environment variables.
+@REM
+@REM   JPDA_SUSPEND    (Optional) Suspend the JVM before the main class is loaded.
+@REM                   Valid values are 'y' and 'n'.  The default is "n".
+@REM
+@REM   JPDA_TRANSPORT  (Optional) JPDA transport used when the "jpda start"
+@REM                   command is executed. The default is "dt_socket".
+@REM                   Note that "dt_socket" is the default instead of "dt_shmem"
+@REM                   because eclipse does not support "dt_shmem".
+@REM
+@REM Troubleshooting execution of this batch file:
+@REM
+@REM   GERONIMO_BATCH_ECHO (Optional) Environment variable that when set to
+@REM                       "on" results in batch commands being echoed.
+@REM
+@REM   GERONIMO_BATCH_PAUSE (Optional) Environment variable that when set to
+@REM                        "on" results in each batch file to pause at the
+@REM                        end of execution
+@REM
+@REM   GERONIMO_ENV_INFO    (Optional) Environment variable that when set to
+@REM                        "on" (the default) outputs the values of
+@REM                        GERONIMO_HOME, GERONIMO_TMPDIR,
+@REM                        JAVA_HOME and JRE_HOME before the command is
+@REM                        issued. Set to "off" if you do not want this
+@REM                        information displayed.
+@REM
+@REM Batch files called by this batch file:
+@REM
+@REM   %GERONIMO_HOME%\bin\setenv.bat
+@REM                   (Optional) This batch file is called if it is present.
+@REM                   Its contents may set one or more of the above environment
+@REM                   variables. It is preferable (to simplify migration to
+@REM                   future Geronimo releases) to set environment variables
+@REM                   in this file rather than modifying Geronimo's script files.
+@REM
+@REM   %GERONIMO_HOME%\bin\setjavaenv.bat
+@REM                   This batch file is called to set environment variables
+@REM                   relating to the java or jdb exe file to call.
+@REM                   This file should not need to be modified.
+@REM
+@REM Exit Codes:
+@REM
+@REM  0        - Success
+@REM  Non-zero - Error
+@REM ---------------------------------------------------------------------------
+
+@if "%GERONIMO_BATCH_ECHO%" == "on"  echo on
+@if not "%GERONIMO_BATCH_ECHO%" == "on"  echo off
+
+@setlocal enableextensions
+
+if not "%GERONIMO_HOME%" == "" goto resolveHome
+@REM %~dp0 is expanded pathname of the current script
+set GERONIMO_HOME=%~dp0..
+
+@REM resolve .. and remove any trailing slashes
+:resolveHome
+set CURRENT_DIR=%cd%
+cd /d %GERONIMO_HOME%
+set GERONIMO_HOME=%cd%
+cd /d %CURRENT_DIR%
+
+:gotHome
+if exist "%GERONIMO_HOME%\bin\geronimo.bat" goto okHome
+echo The GERONIMO_HOME environment variable is not defined correctly
+echo This environment variable is needed to run this program
+cmd /c exit /b 1
+goto end
+:okHome
+
+@REM Get standard environment variables
+@REM Users can optionally create this file to set environment variables.
+if exist "%GERONIMO_HOME%\bin\setenv.bat" call "%GERONIMO_HOME%\bin\setenv.bat"
+if not %errorlevel% == 0 goto end
+
+@REM Get standard Java environment variables (based upon Tomcat's setclasspath.bat
+@REM but renamed since Geronimo's classpath is set in the JAR manifest)
+if exist "%GERONIMO_HOME%\bin\setjavaenv.bat" goto okSetJavaEnv
+echo Cannot find %GERONIMO_HOME%\bin\setjavaenv.bat
+echo This file is needed to run this program
+cmd /c exit /b 1
+goto end
+:okSetJavaEnv
+set BASEDIR=%GERONIMO_HOME%
+call "%GERONIMO_HOME%\bin\setJavaEnv.bat"
+if not %errorlevel% == 0 goto end
+
+@REM Using default JAVA_OPTS if it's not set
+if not "%JAVA_OPTS%" == "" goto skipDefaultJavaOpts
+set JAVA_OPTS=-Xmx256m -XX:MaxPermSize=128m
+:skipDefaultJavaOpts
+
+if not "%GERONIMO_TMPDIR%" == "" goto gotTmpdir
+@REM A relative value will be resolved relative to each instance 
+set GERONIMO_TMPDIR=var\temp
+:gotTmpdir
 
-title Karaf
-
-goto BEGIN
-
-:warn
-    echo %PROGNAME%: %*
-goto :EOF
-
-:BEGIN
-
-rem # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
-
-if not "%KARAF_HOME%" == "" (
-    call :warn Ignoring predefined value for KARAF_HOME
-)
-set KARAF_HOME=%DIRNAME%..
-if not exist "%KARAF_HOME%" (
-    call :warn KARAF_HOME is not valid: %KARAF_HOME%
-    goto END
-)
-
-if not "%KARAF_BASE%" == "" (
-    if not exist "%KARAF_BASE%" (
-       call :warn KARAF_BASE is not valid: %KARAF_BASE%
-       goto END
-    )
-)
-if "%KARAF_BASE%" == "" (
-  set KARAF_BASE=%KARAF_HOME%
-)
-
-set LOCAL_CLASSPATH=%CLASSPATH%
-set DEFAULT_JAVA_OPTS=-server -Xmx512M -Dderby.system.home="%KARAF_BASE%\data\derby" -Dderby.storage.fileSyncTransactionLog=true -Dcom.sun.management.jmxremote
-set CLASSPATH=%LOCAL_CLASSPATH%;%KARAF_BASE%\conf
-set DEFAULT_JAVA_DEBUG_OPTS=-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
-
-if "%LOCAL_CLASSPATH%" == "" goto :KARAF_CLASSPATH_EMPTY
-    set CLASSPATH=%LOCAL_CLASSPATH%;%KARAF_BASE%\conf
-    goto :KARAF_CLASSPATH_END
-:KARAF_CLASSPATH_EMPTY
-    set CLASSPATH=%KARAF_BASE%\conf
-:KARAF_CLASSPATH_END
-
-rem Setup Karaf Home
-if exist "%KARAF_HOME%\conf\karaf-rc.cmd" call %KARAF_HOME%\conf\karaf-rc.cmd
-if exist "%HOME%\karaf-rc.cmd" call %HOME%\karaf-rc.cmd
-
-rem Support for loading native libraries
-set PATH=%PATH%;%KARAF_BASE%\lib;%KARAF_HOME%\lib
-
-rem Setup the Java Virtual Machine
-if not "%JAVA%" == "" goto :Check_JAVA_END
-    set JAVA=java
-    if "%JAVA_HOME%" == "" call :warn JAVA_HOME not set; results may vary
-    if not "%JAVA_HOME%" == "" set JAVA=%JAVA_HOME%\bin\java
-    if not exist "%JAVA_HOME%" (
-        call :warn JAVA_HOME is not valid: "%JAVA_HOME%"
-        goto END
-    )
-:Check_JAVA_END
-
-if "%JAVA_OPTS%" == "" set JAVA_OPTS=%DEFAULT_JAVA_OPTS%
-
-if "%KARAF_DEBUG%" == "" goto :KARAF_DEBUG_END
-    rem Use the defaults if JAVA_DEBUG_OPTS was not set
-    if "%JAVA_DEBUG_OPTS%" == "" set JAVA_DEBUG_OPTS=%DEFAULT_JAVA_DEBUG_OPTS%
-    
-    set "JAVA_OPTS=%JAVA_DEBUG_OPTS% %JAVA_OPTS%"
-    call :warn Enabling Java debug options: %JAVA_DEBUG_OPTS%
-:KARAF_DEBUG_END
-
-if "%KARAF_PROFILER%" == "" goto :KARAF_PROFILER_END
-    set KARAF_PROFILER_SCRIPT=%KARAF_HOME%\conf\profiler\%KARAF_PROFILER%.cmd
-    
-    if exist "%KARAF_PROFILER_SCRIPT%" goto :KARAF_PROFILER_END
-    call :warn Missing configuration for profiler '%KARAF_PROFILER%': %KARAF_PROFILER_SCRIPT%
-    goto END
-:KARAF_PROFILER_END
-
-rem Setup the classpath
-pushd "%KARAF_HOME%\lib"
+@REM Setup the classpath
+pushd "%GERONIMO_HOME%\lib"
 for %%G in (*.*) do call:APPEND_TO_CLASSPATH %%G
 popd
 goto CLASSPATH_END
 
-: APPEND_TO_CLASSPATH
+:APPEND_TO_CLASSPATH
 set filename=%~1
 set suffix=%filename:~-4%
-if %suffix% equ .jar set CLASSPATH=%CLASSPATH%;%KARAF_HOME%\lib\%filename%
+if %suffix% equ .jar set CLASSPATH=%CLASSPATH%;%GERONIMO_HOME%\lib\%filename%
 goto :EOF
 
 :CLASSPATH_END
 
-rem Execute the JVM or the load the profiler
-if "%KARAF_PROFILER%" == "" goto :RUN
-    rem Execute the profiler if it has been configured
-    call :warn Loading profiler script: %KARAF_PROFILER_SCRIPT%
-    call %KARAF_PROFILER_SCRIPT%
-
-:RUN
-    SET OPTS=-Dkaraf.startLocalConsole=true -Dkaraf.startRemoteShell=true
-    SET SHIFT=false
-    if "%1" == "console" goto :EXECUTE_CONSOLE
-    if "%1" == "server" goto :EXECUTE_SERVER
-    if "%1" == "client" goto :EXECUTE_CLIENT
-    goto :EXECUTE
-
-:EXECUTE_CONSOLE
-    SET SHIFT=true
-    goto :EXECUTE    
-
-:EXECUTE_SERVER
-    SET OPTS=-Dkaraf.startLocalConsole=false -Dkaraf.startRemoteShell=true
-    SET SHIFT=true
-    goto :EXECUTE
-
-:EXECUTE_CLIENT
-    SET OPTS=-Dkaraf.startLocalConsole=true -Dkaraf.startRemoteShell=false
-    SET SHIFT=true
-    goto :EXECUTE
-
-:EXECUTE
-    if "%SHIFT%" == "true" SET ARGS=%2 %3 %4 %5 %6 %7 %8
-    if not "%SHIFT%" == "true" SET ARGS=%1 %2 %3 %4 %5 %6 %7 %8    
-    rem Execute the Java Virtual Machine
-    "%JAVA%" %JAVA_OPTS% %OPTS% -classpath "%CLASSPATH%" -Dorg.apache.geronimo.home.dir="%KARAF_HOME%" -Dkaraf.home="%KARAF_HOME%" -Dkaraf.base="%KARAF_BASE%" -Djava.util.logging.config.file="%KARAF_BASE%\etc\java.util.logging.properties" org.apache.geronimo.cli.daemon.DaemonCLI %ARGS%
-
-rem # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
-
-:END
-
-endlocal
-
-if not "%PAUSE%" == "" pause
-
-:END_NO_PAUSE
-
+set _EXECJAVA=%_RUNJAVA%
+@REM MAINCLASS required for jdb debugger as it requires the mainclass
+@REM parameter. For other commands, the main class is obtained from
+@REM the JAR manifest.
+set MAINCLASS=org.apache.geronimo.cli.daemon.DaemonCLI
+set JPDA=
+
+if not ""%1"" == ""jpda"" goto noJpda
+set JPDA=jpda
+if not "%JPDA_SUSPEND%" == "" goto gotJpdaSuspend
+set JPDA_SUSPEND=n
+:gotJpdaSuspend
+if not "%JPDA_TRANSPORT%" == "" goto gotJpdaTransport
+@REM Note that "dt_socket" is the default instead of "dt_shmem"
+@REM because eclipse does not support "dt_shmem".
+set JPDA_TRANSPORT=dt_socket
+:gotJpdaTransport
+if not "%JPDA_ADDRESS%" == "" goto gotJpdaAddress
+set JPDA_ADDRESS=8000
+:gotJpdaAddress
+if not "%JPDA_OPTS%" == "" goto gotJpdaOpts
+set JPDA_OPTS=-Xdebug -Xrunjdwp:transport=%JPDA_TRANSPORT%,address=%JPDA_ADDRESS%,server=y,suspend=%JPDA_SUSPEND%
+:gotJpdaOpts
+set GERONIMO_OPTS=%GERONIMO_OPTS% %JPDA_OPTS%
+shift
+:noJpda
+
+@REM ----- Execute The Requested Command ---------------------------------------
+@if "%GERONIMO_ENV_INFO%" == "off" goto skipEnvInfo
+echo Using GERONIMO_HOME:   %GERONIMO_HOME%
+echo Using GERONIMO_TMPDIR: %GERONIMO_TMPDIR%
+if "%_REQUIRE_JDK%" == "1" echo Using JAVA_HOME:       %JAVA_HOME%
+if "%_REQUIRE_JDK%" == "0" echo Using JRE_HOME:        %JRE_HOME%
+if not "%JPDA%" == "jpda" goto skipJpdaEnvInfo
+@REM output JPDA info to assist diagnosing JPDA debugger config issues.
+echo Using JPDA_OPTS:       %JPDA_OPTS%
+:skipJpdaEnvInfo
+:skipEnvInfo
+
+if ""%1"" == ""debug"" goto doDebug
+if ""%1"" == ""run"" goto doRun
+if ""%1"" == ""start"" goto doStart
+if ""%1"" == ""stop"" goto doStop
+
+echo Usage:  geronimo command [args]
+echo commands:
+echo   debug             Debug Geronimo in jdb debugger
+echo   jpda run          Start Geronimo in foreground under JPDA debugger
+echo   jpda start        Start Geronimo in background under JPDA debugger
+echo   run               Start Geronimo in the current window
+echo   start             Start Geronimo in a separate window
+echo   stop              Stop Geronimo
+echo.
+echo args for debug, jpda run, jpda start, run and start commands:
+echo        --quiet       No startup progress
+echo        --long        Long startup progress
+echo   -v   --verbose     INFO log level
+echo   -vv  --veryverbose DEBUG log level
+echo        --override    Override configurations. USE WITH CAUTION!
+echo        --help        Detailed help.
+echo.
+echo args for stop command:
+echo        --user        Admin user
+echo        --password    Admin password
+echo        --host        Hostname of the server
+echo        --port        RMI port to connect to
+echo        --secure      Enable secure JMX communication
+cmd /c exit /b 1
+goto end
+
+:doDebug
+shift
+set _EXECJAVA=%_RUNJDB%
+set JDB=jdb
+set CONSOLE_OPTS=-Dkaraf.startLocalConsole=true -Dkaraf.startRemoteShell=true
+if not "%JDB_SRCPATH%" == "" goto gotJdbSrcPath
+set JDB_SRCPATH=%GERONIMO_HOME%\src
+:gotJdbSrcPath
+echo Note: The jdb debugger will start Geronimo in another process and connect to it.
+echo       To terminate Geronimo when running under jdb, run the "geronimo stop" command
+echo       in another window.  Do not use Ctrl-C as that will terminate the jdb client
+echo       (the debugger itself) but will not stop the Geronimo process.
+goto execCmd
+
+:doRun
+shift
+set CONSOLE_OPTS=-Dkaraf.startLocalConsole=true -Dkaraf.startRemoteShell=false
+goto execCmd
+
+:doStart
+echo.
+echo Starting Geronimo in a separate window...
+shift
+@REM use long format of startup progress to be consistent with
+@REM the unix version of the start processing
+set _LONG_OPT=--long
+set _EXECJAVA=start "Geronimo Application Server" /d"%GERONIMO_HOME%\bin" %GERONIMO_WIN_START_ARGS% %_RUNJAVA%
+set CONSOLE_OPTS=-Dkaraf.startLocalConsole=false -Dkaraf.startRemoteShell=true
+goto execCmd
+
+:doStop
+shift
+set MAINCLASS=org.apache.geronimo.cli.shutdown.ShutdownCLI
+set CONSOLE_OPTS=-Dkaraf.startLocalConsole=false -Dkaraf.startRemoteShell=false
+goto execCmd
+
+:execCmd
+@REM Get remaining unshifted command line arguments and save them in the
+set CMD_LINE_ARGS=
+:setArgs
+if ""%1""=="""" goto doneSetArgs
+set CMD_LINE_ARGS=%CMD_LINE_ARGS% %1
+shift
+goto setArgs
+:doneSetArgs
+
+@REM Setup the Java programming language agent
+set JAVA_AGENT_JAR=%GERONIMO_HOME%\bin\jpa.jar
+set JAVA_AGENT_OPTS=
+if exist "%JAVA_AGENT_JAR%" set JAVA_AGENT_OPTS=-javaagent:"%JAVA_AGENT_JAR%"
+
+@REM Must reset ERRORLEVEL
+cmd /c exit /b 0
+
+@REM Execute Java with the applicable properties
+if not "%JDB%" == "" goto doJDB
+%_EXECJAVA% %JAVA_OPTS% %GERONIMO_OPTS% %JAVA_AGENT_OPTS% %CONSOLE_OPTS% -Dorg.apache.geronimo.home.dir="%GERONIMO_HOME%"  -Dkaraf.home="%GERONIMO_HOME%" -Dkaraf.base="%GERONIMO_HOME%" -Djava.util.logging.config.file="%GERONIMO_HOME%\etc\java.util.logging.properties" -Djava.endorsed.dirs="%GERONIMO_HOME%\lib\endorsed;%JRE_HOME%\lib\endorsed" -Djava.ext.dirs="%GERONIMO_HOME%\lib\ext;%JRE_HOME%\lib\ext" -Djava.io.tmpdir="%GERONIMO_TMPDIR%" -classpath "%CLASSPATH%" %MAINCLASS% %_LONG_OPT% %CMD_LINE_ARGS%
+goto end
+
+:doJDB
+%_EXECJAVA% %JAVA_OPTS% %GERONIMO_OPTS% -sourcepath "%JDB_SRCPATH%" %CONSOLE_OPTS% -Dorg.apache.geronimo.home.dir="%GERONIMO_HOME%"  -Dkaraf.home="%GERONIMO_HOME%" -Dkaraf.base="%GERONIMO_HOME%" -Djava.util.logging.config.file="%GERONIMO_HOME%\etc\java.util.logging.properties" -Djava.endorsed.dirs="%GERONIMO_HOME%\lib\endorsed;%JRE_HOME%\lib\endorsed" -Djava.ext.dirs="%GERONIMO_HOME%\lib\ext;%JRE_HOME%\lib\ext" -Djava.io.tmpdir="%GERONIMO_TMPDIR%" -classpath "%CLASSPATH%" %MAINCLASS% %CMD_LINE_ARGS%
+goto end
+
+:end
+@REM pause the batch file if GERONIMO_BATCH_PAUSE is set to 'on'
+if "%GERONIMO_BATCH_PAUSE%" == "on" pause
+@endlocal
+cmd /c exit /b %errorlevel%

Added: geronimo/server/trunk/framework/configs/karaf-framework/src/main/distribution/windows-text/bin/setjavaenv.bat
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/configs/karaf-framework/src/main/distribution/windows-text/bin/setjavaenv.bat?rev=935712&view=auto
==============================================================================
--- geronimo/server/trunk/framework/configs/karaf-framework/src/main/distribution/windows-text/bin/setjavaenv.bat (added)
+++ geronimo/server/trunk/framework/configs/karaf-framework/src/main/distribution/windows-text/bin/setjavaenv.bat Mon Apr 19 19:41:37 2010
@@ -0,0 +1,100 @@
+@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 --------------------------------------------------------------------
+@REM $Rev: 741689 $ $Date: 2009-02-06 14:38:00 -0500 (Fri, 06 Feb 2009) $
+@REM --------------------------------------------------------------------
+
+@REM --------------------------------------------------------------------
+@REM Set environment variables relating to the execution of java commands
+@REM
+@REM This batch file is called by the geronimo.bat file (which is
+@REM invoked by the startup.bat, shutdown.bat files).  This file is
+@REM also invoked by the deploy.bat file.
+@REM
+@REM It is preferable (to simplify migration to future Geronimo releases)
+@REM to set any environment variables you need in the setenv.bat file
+@REM rather than modifying Geronimo's script files.  See the documentation
+@REM in the geronimo.bat file for further information.
+@REM
+@REM (Based upon Apache Tomcat 5.5.12's setclasspath.bat although modified
+@REM to be more consistent with the shell script version's support of
+@REM JDK_HOME and JRE_HOME)
+@REM
+@REM --------------------------------------------------------------------
+
+@REM Begin all @REM lines with '@' in case GERONIMO_BATCH_ECHO is 'on'
+@if "%GERONIMO_BATCH_ECHO%" == "on"  echo on
+@if not "%GERONIMO_BATCH_ECHO%" == "on"  echo off
+
+@REM Handle spaces in provided paths.  Also strips off quotes.
+if defined var JAVA_HOME(
+set JAVA_HOME=###%JAVA_HOME%###
+set JAVA_HOME=%JAVA_HOME:"###=%
+set JAVA_HOME=%JAVA_HOME:###"=%
+set JAVA_HOME=%JAVA_HOME:###=%
+@)
+if defined var JRE_HOME(
+set JRE_HOME=###%JRE_HOME%###
+set JRE_HOME=%JRE_HOME:"###=%
+set JRE_HOME=%JRE_HOME:###"=%
+set JRE_HOME=%JRE_HOME:###=%
+@)
+
+@REM check that either JAVA_HOME or JRE_HOME are set
+set jdkOrJreHomeSet=0
+if not "%JAVA_HOME%" == "" set jdkOrJreHomeSet=1
+if not "%JRE_HOME%" == "" set jdkOrJreHomeSet=1
+if "%jdkOrJreHomeSet%" == "1" goto gotJdkOrJreHome
+echo Neither the JAVA_HOME nor the JRE_HOME environment variable is defined
+echo At least one of these environment variable is needed to run this program
+cmd /c exit /b 1
+goto end
+
+@REM If we get this far we have either JAVA_HOME or JRE_HOME set
+@REM now check whether the command requires the JDK and if so
+@REM check that JAVA_HOME is really pointing to the JDK files.
+:gotJdkOrJreHome
+set _REQUIRE_JDK=0
+if "%1" == "debug" set _REQUIRE_JDK=1
+if "%_REQUIRE_JDK%" == "0" goto okJdkFileCheck
+
+set jdkNotFound=0
+if not exist "%JAVA_HOME%\bin\java.exe" set jdkNotFound=1
+if not exist "%JAVA_HOME%\bin\javaw.exe" set jdkNotFound=1
+if not exist "%JAVA_HOME%\bin\jdb.exe" set jdkNotFound=1
+if not exist "%JAVA_HOME%\bin\javac.exe" set jdkNotFound=1
+if %jdkNotFound% == 0 goto okJdkFileCheck
+echo The JAVA_HOME environment variable is not defined correctly
+echo This environment variable is needed to run this program
+echo NB: JAVA_HOME should point to a JDK not a JRE
+cmd /c exit /b 1
+goto end
+
+:okJdkFileCheck
+@REM default JRE_HOME to JAVA_HOME if not set.
+if "%JRE_HOME%" == "" if exist "%JAVA_HOME%\bin\javac.exe" (set JRE_HOME=%JAVA_HOME%\jre) else set JRE_HOME=%JAVA_HOME%
+
+@REM Set standard command for invoking Java.
+@REM Note that NT requires a window name argument when using start.
+@REM Also note the quoting as JAVA_HOME may contain spaces.
+set _RUNJAVA="%JRE_HOME%\bin\java"
+set _RUNJAVAW="%JRE_HOME%\bin\javaw"
+set _RUNJDB="%JAVA_HOME%\bin\jdb"
+
+:end
+@REM pause the batch file if GERONIMO_BATCH_PAUSE is set to 'on'
+if "%GERONIMO_BATCH_PAUSE%" == "on" pause

Propchange: geronimo/server/trunk/framework/configs/karaf-framework/src/main/distribution/windows-text/bin/setjavaenv.bat
------------------------------------------------------------------------------
    svn:eol-style = CRLF

Propchange: geronimo/server/trunk/framework/configs/karaf-framework/src/main/distribution/windows-text/bin/setjavaenv.bat
------------------------------------------------------------------------------
    svn:executable = *

Propchange: geronimo/server/trunk/framework/configs/karaf-framework/src/main/distribution/windows-text/bin/setjavaenv.bat
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: geronimo/server/trunk/framework/configs/karaf-framework/src/main/distribution/windows-text/bin/shutdown.bat
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/configs/karaf-framework/src/main/distribution/windows-text/bin/shutdown.bat?rev=935712&r1=935711&r2=935712&view=diff
==============================================================================
--- geronimo/server/trunk/framework/configs/karaf-framework/src/main/distribution/windows-text/bin/shutdown.bat (original)
+++ geronimo/server/trunk/framework/configs/karaf-framework/src/main/distribution/windows-text/bin/shutdown.bat Mon Apr 19 19:41:37 2010
@@ -1,166 +1,98 @@
-@echo off
-rem
-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 
-rem $Id: karaf.bat 979 2005-11-30 22:50:55Z bsnyder $
-rem 
-
-if not "%ECHO%" == "" echo %ECHO%
-
-setlocal
-set DIRNAME=%~dp0%
-set PROGNAME=%~nx0%
-set ARGS=%*
-
-title Karaf
-
-goto BEGIN
-
-:warn
-    echo %PROGNAME%: %*
-goto :EOF
-
-:BEGIN
-
-rem # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
-
-if not "%KARAF_HOME%" == "" (
-    call :warn Ignoring predefined value for KARAF_HOME
-)
-set KARAF_HOME=%DIRNAME%..
-if not exist "%KARAF_HOME%" (
-    call :warn KARAF_HOME is not valid: %KARAF_HOME%
-    goto END
-)
-
-if not "%KARAF_BASE%" == "" (
-    if not exist "%KARAF_BASE%" (
-       call :warn KARAF_BASE is not valid: %KARAF_BASE%
-       goto END
-    )
-)
-if "%KARAF_BASE%" == "" (
-  set KARAF_BASE=%KARAF_HOME%
-)
-
-set LOCAL_CLASSPATH=%CLASSPATH%
-set DEFAULT_JAVA_OPTS=-server -Xmx512M -Dderby.system.home="%KARAF_BASE%\data\derby" -Dderby.storage.fileSyncTransactionLog=true -Dcom.sun.management.jmxremote
-set CLASSPATH=%LOCAL_CLASSPATH%;%KARAF_BASE%\conf
-set DEFAULT_JAVA_DEBUG_OPTS=-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
-
-if "%LOCAL_CLASSPATH%" == "" goto :KARAF_CLASSPATH_EMPTY
-    set CLASSPATH=%LOCAL_CLASSPATH%;%KARAF_BASE%\conf
-    goto :KARAF_CLASSPATH_END
-:KARAF_CLASSPATH_EMPTY
-    set CLASSPATH=%KARAF_BASE%\conf
-:KARAF_CLASSPATH_END
-
-rem Setup Karaf Home
-if exist "%KARAF_HOME%\conf\karaf-rc.cmd" call %KARAF_HOME%\conf\karaf-rc.cmd
-if exist "%HOME%\karaf-rc.cmd" call %HOME%\karaf-rc.cmd
-
-rem Support for loading native libraries
-set PATH=%PATH%;%KARAF_BASE%\lib;%KARAF_HOME%\lib
-
-rem Setup the Java Virtual Machine
-if not "%JAVA%" == "" goto :Check_JAVA_END
-    set JAVA=java
-    if "%JAVA_HOME%" == "" call :warn JAVA_HOME not set; results may vary
-    if not "%JAVA_HOME%" == "" set JAVA=%JAVA_HOME%\bin\java
-    if not exist "%JAVA_HOME%" (
-        call :warn JAVA_HOME is not valid: "%JAVA_HOME%"
-        goto END
-    )
-:Check_JAVA_END
-
-if "%JAVA_OPTS%" == "" set JAVA_OPTS=%DEFAULT_JAVA_OPTS%
-
-if "%KARAF_DEBUG%" == "" goto :KARAF_DEBUG_END
-    rem Use the defaults if JAVA_DEBUG_OPTS was not set
-    if "%JAVA_DEBUG_OPTS%" == "" set JAVA_DEBUG_OPTS=%DEFAULT_JAVA_DEBUG_OPTS%
-    
-    set "JAVA_OPTS=%JAVA_DEBUG_OPTS% %JAVA_OPTS%"
-    call :warn Enabling Java debug options: %JAVA_DEBUG_OPTS%
-:KARAF_DEBUG_END
-
-if "%KARAF_PROFILER%" == "" goto :KARAF_PROFILER_END
-    set KARAF_PROFILER_SCRIPT=%KARAF_HOME%\conf\profiler\%KARAF_PROFILER%.cmd
-    
-    if exist "%KARAF_PROFILER_SCRIPT%" goto :KARAF_PROFILER_END
-    call :warn Missing configuration for profiler '%KARAF_PROFILER%': %KARAF_PROFILER_SCRIPT%
-    goto END
-:KARAF_PROFILER_END
-
-rem Setup the classpath
-pushd "%KARAF_HOME%\lib"
-for %%G in (*.*) do call:APPEND_TO_CLASSPATH %%G
-popd
-goto CLASSPATH_END
-
-: APPEND_TO_CLASSPATH
-set filename=%~1
-set suffix=%filename:~-4%
-if %suffix% equ .jar set CLASSPATH=%CLASSPATH%;%KARAF_HOME%\lib\%filename%
-goto :EOF
-
-:CLASSPATH_END
-
-rem Execute the JVM or the load the profiler
-if "%KARAF_PROFILER%" == "" goto :RUN
-    rem Execute the profiler if it has been configured
-    call :warn Loading profiler script: %KARAF_PROFILER_SCRIPT%
-    call %KARAF_PROFILER_SCRIPT%
-
-:RUN
-    SET OPTS=-Dkaraf.startLocalConsole=false -Dkaraf.startRemoteShell=true
-    SET SHIFT=false
-    if "%1" == "console" goto :EXECUTE_CONSOLE
-    if "%1" == "server" goto :EXECUTE_SERVER
-    if "%1" == "client" goto :EXECUTE_CLIENT
-    goto :EXECUTE
-
-:EXECUTE_CONSOLE
-    SET SHIFT=true
-    goto :EXECUTE    
-
-:EXECUTE_SERVER
-    SET OPTS=-Dkaraf.startLocalConsole=false -Dkaraf.startRemoteShell=true
-    SET SHIFT=true
-    goto :EXECUTE
-
-:EXECUTE_CLIENT
-    SET OPTS=-Dkaraf.startLocalConsole=true -Dkaraf.startRemoteShell=false
-    SET SHIFT=true
-    goto :EXECUTE
-
-:EXECUTE
-    if "%SHIFT%" == "true" SET ARGS=%2 %3 %4 %5 %6 %7 %8
-    if not "%SHIFT%" == "true" SET ARGS=%1 %2 %3 %4 %5 %6 %7 %8    
-    rem Execute the Java Virtual Machine
-    "%JAVA%" %JAVA_OPTS% %OPTS% -classpath "%CLASSPATH%" -Dorg.apache.geronimo.home.dir="%KARAF_HOME%" -Dkaraf.home="%KARAF_HOME%" -Dkaraf.base="%KARAF_BASE%" -Djava.util.logging.config.file="%KARAF_BASE%\etc\java.util.logging.properties" org.apache.geronimo.cli.shutdown.ShutdownCLI %ARGS%
-
-rem # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
-
-:END
-
-endlocal
-
-if not "%PAUSE%" == "" pause
-
-:END_NO_PAUSE
-
+@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: 899564 $ $Date: 2010-01-15 03:38:51 -0500 (Fri, 15 Jan 2010) $
+@REM --------------------------------------------------------------------
+
+@REM --------------------------------------------------------------------
+@REM Shutdown batch file for Geronimo.
+@REM
+@REM This batch file calls the geronimo.bat script passing "stop" as the
+@REM first argument followed by the arguments supplied by the caller.
+@REM
+@REM This batch file is based upon Tomcat's shutdown.bat file to enable
+@REM those familiar with Tomcat to easily stop Geronimo.
+@REM
+@REM Alternatively you can use the more comprehensive geronimo.bat file
+@REM directly.
+@REM
+@REM Invocation Syntax:
+@REM
+@REM   shutdown [stop command args ...]
+@REM
+@REM   Invoke the shutdown.bat file without any arguments for information
+@REM   on arguments for the geronimo.bat stop command that is invoked by
+@REM   this batch file.
+@REM
+@REM Environment Variable Prequisites:
+@REM
+@REM   Refer to the documentation in the geronimo.bat file for information
+@REM   on environment variables etc.
+@REM
+@REM --------------------------------------------------------------------
+
+@if "%GERONIMO_BATCH_ECHO%" == "on"  echo on
+@if not "%GERONIMO_BATCH_ECHO%" == "on"  echo off
+
+@setlocal enableextensions
+
+if not "%GERONIMO_HOME%" == "" goto resolveHome
+@REM %~dp0 is expanded pathname of the current script
+set GERONIMO_HOME=%~dp0..
+
+@REM resolve .. and remove any trailing slashes
+:resolveHome
+set CURRENT_DIR=%cd%
+cd /d %GERONIMO_HOME%
+set GERONIMO_HOME=%cd%
+cd /d %CURRENT_DIR%
+
+:gotHome
+if exist "%GERONIMO_HOME%\bin\geronimo.bat" goto okHome
+echo The GERONIMO_HOME environment variable is not defined correctly
+echo This environment variable is needed to run this program
+cmd /c exit /b 1
+goto end
+
+:okHome
+
+set EXECUTABLE=%GERONIMO_HOME%\bin\geronimo.bat
+
+@REM Check that target executable exists
+if exist "%EXECUTABLE%" goto okExec
+echo Cannot find %EXECUTABLE%
+echo This file is needed to run this program
+cmd /c exit /b 1
+goto end
+:okExec
+
+@REM Get remaining unshifted command line arguments and save them in the
+set CMD_LINE_ARGS=
+:setArgs
+if ""%1""=="""" goto doneSetArgs
+set CMD_LINE_ARGS=%CMD_LINE_ARGS% %1
+shift
+goto setArgs
+:doneSetArgs
+
+call "%EXECUTABLE%" stop %CMD_LINE_ARGS%
+
+:end
+@REM pause the batch file if GERONIMO_BATCH_PAUSE is set to 'on'
+if "%GERONIMO_BATCH_PAUSE%" == "on" pause
+@endlocal
+cmd /c exit /b %errorlevel%

Added: geronimo/server/trunk/framework/configs/karaf-framework/src/main/distribution/windows-text/bin/startup.bat
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/configs/karaf-framework/src/main/distribution/windows-text/bin/startup.bat?rev=935712&view=auto
==============================================================================
--- geronimo/server/trunk/framework/configs/karaf-framework/src/main/distribution/windows-text/bin/startup.bat (added)
+++ geronimo/server/trunk/framework/configs/karaf-framework/src/main/distribution/windows-text/bin/startup.bat Mon Apr 19 19:41:37 2010
@@ -0,0 +1,93 @@
+@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 --------------------------------------------------------------------
+@REM $Rev: 899564 $ $Date: 2010-01-15 03:38:51 -0500 (Fri, 15 Jan 2010) $
+@REM --------------------------------------------------------------------
+
+@REM --------------------------------------------------------------------
+@REM Startup batch file for Geronimo that starts Geronimo in a new window.
+@REM
+@REM This batch file calls the geronimo.bat script passing "start" as the
+@REM first argument followed by the arguments supplied by the caller.
+@REM
+@REM This batch file is based upon Tomcat's startup.bat file to enable
+@REM those familiar with Tomcat to quickly get started with Geronimo.
+@REM
+@REM Alternatively you can use the more comprehensive geronimo.bat file
+@REM directly.
+@REM
+@REM Invocation Syntax:
+@REM
+@REM   startup [geronimo_args ...]
+@REM
+@REM Environment Variable Prequisites:
+@REM
+@REM   Refer to the documentation in the geronimo.bat file for information
+@REM   on environment variables etc.
+@REM
+@REM --------------------------------------------------------------------
+
+@if "%GERONIMO_BATCH_ECHO%" == "on"  echo on
+@if not "%GERONIMO_BATCH_ECHO%" == "on"  echo off
+
+@setlocal enableextensions
+
+if not "%GERONIMO_HOME%" == "" goto resolveHome
+@REM %~dp0 is expanded pathname of the current script
+set GERONIMO_HOME=%~dp0..
+
+@REM resolve .. and remove any trailing slashes
+:resolveHome
+set CURRENT_DIR=%cd%
+cd /d %GERONIMO_HOME%
+set GERONIMO_HOME=%cd%
+cd /d %CURRENT_DIR%
+
+:gotHome
+if exist "%GERONIMO_HOME%\bin\geronimo.bat" goto okHome
+echo The GERONIMO_HOME environment variable is not defined correctly
+echo This environment variable is needed to run this program
+cmd /c exit /b 1
+goto end
+:okHome
+
+set EXECUTABLE=%GERONIMO_HOME%\bin\geronimo.bat
+
+@REM Check that target executable exists
+if exist "%EXECUTABLE%" goto okExec
+echo Cannot find %EXECUTABLE%
+echo This file is needed to run this program
+cmd /c exit /b 1
+goto end
+:okExec
+
+@REM Get remaining unshifted command line arguments and save them in the
+set CMD_LINE_ARGS=
+:setArgs
+if ""%1""=="""" goto doneSetArgs
+set CMD_LINE_ARGS=%CMD_LINE_ARGS% %1
+shift
+goto setArgs
+:doneSetArgs
+
+call "%EXECUTABLE%" start %CMD_LINE_ARGS%
+
+:end
+@REM pause the batch file if GERONIMO_BATCH_PAUSE is set to 'on'
+if "%GERONIMO_BATCH_PAUSE%" == "on" pause
+@endlocal
+cmd /c exit /b %errorlevel%

Propchange: geronimo/server/trunk/framework/configs/karaf-framework/src/main/distribution/windows-text/bin/startup.bat
------------------------------------------------------------------------------
    svn:eol-style = CRLF

Propchange: geronimo/server/trunk/framework/configs/karaf-framework/src/main/distribution/windows-text/bin/startup.bat
------------------------------------------------------------------------------
    svn:executable = *

Propchange: geronimo/server/trunk/framework/configs/karaf-framework/src/main/distribution/windows-text/bin/startup.bat
------------------------------------------------------------------------------
    svn:mime-type = text/plain



Mime
View raw message