Return-Path: Delivered-To: apmail-jakarta-tomcat-dev-archive@apache.org Received: (qmail 97679 invoked from network); 1 Aug 2002 18:02:24 -0000 Received: from unknown (HELO nagoya.betaversion.org) (192.18.49.131) by daedalus.apache.org with SMTP; 1 Aug 2002 18:02:24 -0000 Received: (qmail 15334 invoked by uid 97); 1 Aug 2002 18:02:34 -0000 Delivered-To: qmlist-jakarta-archive-tomcat-dev@jakarta.apache.org Received: (qmail 15318 invoked by uid 97); 1 Aug 2002 18:02:34 -0000 Mailing-List: contact tomcat-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Tomcat Developers List" Reply-To: "Tomcat Developers List" Delivered-To: mailing list tomcat-dev@jakarta.apache.org Received: (qmail 15307 invoked by uid 97); 1 Aug 2002 18:02:33 -0000 X-Antivirus: nagoya (v4198 created Apr 24 2002) Date: 1 Aug 2002 18:02:07 -0000 Message-ID: <20020801180207.76210.qmail@icarus.apache.org> From: patrickl@apache.org To: jakarta-tomcat-catalina-cvs@apache.org Subject: cvs commit: jakarta-tomcat-catalina/catalina/src/bin catalina.xml tool-wrapper.bat tool-wrapper.sh catalina.bat cpappend.bat digest.bat digest.sh setclasspath.bat setclasspath.sh X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N patrickl 2002/08/01 11:02:07 Modified: catalina build.xml catalina/src/bin catalina.xml tool-wrapper.bat tool-wrapper.sh Removed: catalina/src/bin catalina.bat cpappend.bat digest.bat digest.sh setclasspath.bat setclasspath.sh Log: Convert tool-wrapper.* scripts to use commons-launcher and obsolete the digest.* scripts since they are scripts that merely invoke the tool-wrapper.* scripts. Also, the setclasspath.* and the cpappend.* scripts are no longer needed now that catalina.xml handles the classpath settings. Revision Changes Path 1.8 +0 -3 jakarta-tomcat-catalina/catalina/build.xml Index: build.xml =================================================================== RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/build.xml,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- build.xml 1 Aug 2002 04:59:24 -0000 1.7 +++ build.xml 1 Aug 2002 18:02:07 -0000 1.8 @@ -711,7 +711,6 @@ - @@ -999,7 +998,6 @@ - @@ -1175,7 +1173,6 @@ - 1.2 +29 -10 jakarta-tomcat-catalina/catalina/src/bin/catalina.xml Index: catalina.xml =================================================================== RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/bin/catalina.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- catalina.xml 1 Aug 2002 04:59:24 -0000 1.1 +++ catalina.xml 1 Aug 2002 18:02:07 -0000 1.2 @@ -13,30 +13,32 @@ - - + + - + - - - - + + + + + - + + - + - + @@ -108,6 +110,23 @@ + + + + + + + + + + + + 1.2 +20 -39 jakarta-tomcat-catalina/catalina/src/bin/tool-wrapper.bat Index: tool-wrapper.bat =================================================================== RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/bin/tool-wrapper.bat,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- tool-wrapper.bat 18 Jul 2002 16:48:14 -0000 1.1 +++ tool-wrapper.bat 1 Aug 2002 18:02:07 -0000 1.2 @@ -1,51 +1,31 @@ @echo off if "%OS%" == "Windows_NT" setlocal + rem --------------------------------------------------------------------------- -rem Wrapper script for command line tools -rem -rem Environment Variable Prequisites -rem -rem CATALINA_HOME May point at your Catalina "build" directory. rem -rem TOOL_OPTS (Optional) Java runtime options used when the "start", -rem "stop", or "run" command is executed. +rem Script for running the Catalina tool wrapper using the Launcher rem -rem JAVA_HOME Must point at your Java Development Kit installation. -rem -rem JAVA_OPTS (Optional) Java runtime options used when the "start", -rem "stop", or "run" command is executed. -rem -rem $Id$ rem --------------------------------------------------------------------------- -rem Guess CATALINA_HOME if not defined -if not "%CATALINA_HOME%" == "" goto gotHome -set CATALINA_HOME=. -if exist "%CATALINA_HOME%\bin\tool-wrapper.bat" goto okHome -set CATALINA_HOME=.. -:gotHome -if exist "%CATALINA_HOME%\bin\tool-wrapper.bat" goto okHome -echo The CATALINA_HOME environment variable is not defined correctly -echo This environment variable is needed to run this program -goto end -:okHome - rem Get standard environment variables -if exist "%CATALINA_HOME%\bin\setenv.bat" call "%CATALINA_HOME%\bin\setenv.bat" - -rem Get standard Java environment variables -if exist "%CATALINA_HOME%\bin\setclasspath.bat" goto okSetclasspath -echo Cannot find %CATALINA_HOME%\bin\setclasspath.bat -echo This file is needed to run this program +set PRG=%0 +if exist %PRG%\..\setenv.bat goto gotCmdPath +rem %0 must have been found by DOS using the %PATH% so we assume that +rem setenv.bat will also be found in the %PATH% +call setenv.bat +goto doneSetenv +:gotCmdPath +call %PRG%\..\setenv.bat +:doneSetenv + +rem Make sure prerequisite environment variables are set +if not "%JAVA_HOME%" == "" goto gotJavaHome +echo The JAVA_HOME environment variable is not defined +echo This environment variable is needed to run this program goto end -:okSetclasspath -set BASEDIR=%CATALINA_HOME% -call "%CATALINA_HOME%\bin\setclasspath.bat" - -rem Add on extra jar files to CLASSPATH -set CLASSPATH=%CLASSPATH%;%CATALINA_HOME%\bin\bootstrap.jar +:gotJavaHome -rem Get remaining unshifted command line arguments and save them in the +rem Get command line arguments and save them with the proper quoting set CMD_LINE_ARGS= :setArgs if ""%1""=="""" goto doneSetArgs @@ -54,6 +34,7 @@ goto setArgs :doneSetArgs -%_RUNJAVA% %JAVA_OPTS% %TOOL_OPTS% -Djava.endorsed.dirs="%JAVA_ENDORSED_DIRS%" -classpath "%CLASSPATH%" -Dcatalina.home="%CATALINA_HOME%" org.apache.catalina.startup.Tool %CMD_LINE_ARGS% +rem Execute the Launcher using the "tool-wrapper" target +"%JAVA_HOME%\bin\java.exe" -classpath %PRG%\..;"%PATH%" LauncherBootstrap -launchfile catalina.xml -verbose tool-wrapper %CMD_LINE_ARGS% :end 1.2 +7 -56 jakarta-tomcat-catalina/catalina/src/bin/tool-wrapper.sh Index: tool-wrapper.sh =================================================================== RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/bin/tool-wrapper.sh,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- tool-wrapper.sh 18 Jul 2002 16:48:14 -0000 1.1 +++ tool-wrapper.sh 1 Aug 2002 18:02:07 -0000 1.2 @@ -1,29 +1,12 @@ #!/bin/sh + # ----------------------------------------------------------------------------- -# Wrapper script for command line tools -# -# Environment Variable Prequisites -# -# CATALINA_HOME May point at your Catalina "build" directory. -# -# TOOL_OPTS (Optional) Java runtime options used when the "start", -# "stop", or "run" command is executed. # -# JAVA_HOME Must point at your Java Development Kit installation. +# Script for running the Catalina tool wrapper using the Launcher # -# JAVA_OPTS (Optional) Java runtime options used when the "start", -# "stop", or "run" command is executed. -# -# $Id$ # ----------------------------------------------------------------------------- -# OS specific support. $var _must_ be set to either true or false. -cygwin=false -case "`uname`" in -CYGWIN*) cygwin=true;; -esac - -# resolve links - $0 may be a softlink +# Resolve links - $0 may be a softlink PRG="$0" while [ -h "$PRG" ]; do @@ -38,41 +21,9 @@ # Get standard environment variables PRGDIR=`dirname "$PRG"` -CATALINA_HOME=`cd "$PRGDIR/.." ; pwd` -if [ -r "$CATALINA_HOME"/bin/setenv.sh ]; then - . "$CATALINA_HOME"/bin/setenv.sh -fi - -# For Cygwin, ensure paths are in UNIX format before anything is touched -if $cygwin; then - [ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"` - [ -n "$CATALINA_HOME" ] && CATALINA_HOME=`cygpath --unix "$CATALINA_HOME"` - [ -n "$CLASSPATH" ] && CLASSPATH=`cygpath --path --unix "$CLASSPATH"` -fi - -# Get standard Java environment variables -if [ -r "$CATALINA_HOME"/bin/setclasspath.sh ]; then - BASEDIR="$CATALINA_HOME" - . "$CATALINA_HOME"/bin/setclasspath.sh -else - echo "Cannot find $CATALINA_HOME/bin/setclasspath.sh" - echo "This file is needed to run this program" - exit 1 +if [ -r "$PRGDIR"/setenv.sh ]; then + . "$PRGDIR"/setenv.sh fi -# Add on extra jar files to CLASSPATH -CLASSPATH="$CLASSPATH":"$CATALINA_HOME"/bin/bootstrap.jar - -# For Cygwin, switch paths to Windows format before running java -if $cygwin; then - JAVA_HOME=`cygpath --path --windows "$JAVA_HOME"` - CATALINA_HOME=`cygpath --path --windows "$CATALINA_HOME"` - CLASSPATH=`cygpath --path --windows "$CLASSPATH"` -fi - -# ----- Execute The Requested Command ----------------------------------------- - -exec "$_RUNJAVA" $JAVA_OPTS $TOOL_OPTS \ - -Djava.endorsed.dirs="$JAVA_ENDORSED_DIRS" -classpath "$CLASSPATH" \ - -Dcatalina.home="$CATALINA_HOME" \ - org.apache.catalina.startup.Tool "$@" +# Execute the Launcher using the "tool-wrapper" target +exec "$JAVA_HOME"/bin/java -classpath "$PRGDIR" LauncherBootstrap -launchfile catalina.xml -verbose tool-wrapper "$@" -- To unsubscribe, e-mail: For additional commands, e-mail: