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 @@
       </copy>
       <fixcrlf srcdir="${catalina.build}/bin" includes="*.sh" eol="lf"/>
       <fixcrlf srcdir="${catalina.build}/bin" includes="*.bat" eol="crlf"/>
  -    <chmod perm="+x" file="${catalina.build}/bin/digest.sh"/>
       <chmod perm="+x" file="${catalina.build}/bin/startup.sh"/>
       <chmod perm="+x" file="${catalina.build}/bin/shutdown.sh"/>
       <chmod perm="+x" file="${catalina.build}/bin/tool-wrapper.sh"/>
  @@ -999,7 +998,6 @@
       </copy>
       <fixcrlf srcdir="${catalina.deploy}/bin" includes="*.sh"  eol="lf"/>
       <fixcrlf srcdir="${catalina.deploy}/bin" includes="*.bat" eol="crlf"/>
  -    <chmod perm="+x" file="${catalina.deploy}/bin/digest.sh"/>
       <chmod perm="+x" file="${catalina.deploy}/bin/startup.sh"/>
       <chmod perm="+x" file="${catalina.deploy}/bin/shutdown.sh"/>
       <chmod perm="+x" file="${catalina.deploy}/bin/tool-wrapper.sh"/>
  @@ -1175,7 +1173,6 @@
       </copy>
       <fixcrlf srcdir="${catalina.dist}/bin" includes="*.sh" eol="lf"/>
       <fixcrlf srcdir="${catalina.dist}/bin" includes="*.bat" eol="crlf"/>
  -    <chmod perm="+x" file="${catalina.dist}/bin/digest.sh"/>
       <chmod perm="+x" file="${catalina.dist}/bin/startup.sh"/>
       <chmod perm="+x" file="${catalina.dist}/bin/shutdown.sh"/>
       <chmod perm="+x" file="${catalina.dist}/bin/tool-wrapper.sh"/>
  
  
  
  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 @@
   <project name="Catalina Launcher" default="catalina" basedir=".">
   
     <!-- Set the application home to the parent directory of this directory -->
  -  <property name="app.home" location="${basedir}/.."/>
  -  <property name="bootstrap.jar" location="${app.home}/bin/bootstrap.jar"/>
  +  <property name="catalina.home" location="${basedir}/.."/>
  +  <property name="bootstrap.jar" location="${catalina.home}/bin/bootstrap.jar"/>
   
     <!-- Import the user's custom properties -->
  -  <property file="${app.home}/bin/catalina.properties"/>
  +  <property file="${catalina.home}/bin/catalina.properties"/>
   
     <!-- Set user configurable properties -->
  -  <property name="catalina.base" location="${app.home}"/>
  -  <property name="catalina.tmpdir" location="${app.home}/temp"/>
  -  <property name="catalina.out" location="${app.home}/logs/catalina.out"/>
  -  <property name="catalina.policy" location="${app.home}/conf/catalina.policy"/>
  +  <property name="jsse.home" location="${catalina.home}"/>
  +  <property name="catalina.base" location="${catalina.home}"/>
  +  <property name="catalina.tmpdir" location="${catalina.home}/temp"/>
  +  <property name="catalina.out" location="${catalina.home}/logs/catalina.out"/>
  +  <property name="catalina.policy" 
location="${catalina.home}/conf/catalina.policy"/>
     <property name="catalina.jvm.args" value=""/>
  -  <property name="catalina.source.path" 
value="${app.home}/../../jakarta-servletapi-5/src/share:${app.home}/../../jakarta-tomcat-jasper/jasper2/src/share:${app.home}/../../jakarta-tomcat-connectors/coyote/src/java:${app.home}/../../jakarta-tomcat-catalina/catalina/src/share"/>
  +  <property name="catalina.source.path" 
value="${catalina.home}/../../jakarta-servletapi-5/src/share:${catalina.home}/../../jakarta-tomcat-jasper/jasper2/src/share:${catalina.home}/../../jakarta-tomcat-connectors/coyote/src/java:${catalina.home}/../../jakarta-tomcat-catalina/catalina/src/share"/>
   
     <!-- Build the classpath relative to the application home -->
     <path id="base.class.path">
       <pathelement location="${bootstrap.jar}"/>
  +    <pathelement 
path="${jsse.home}/lib/jsse.jar:${jsse.home}/lib/jcert.jar:${jsse.home}/lib/jnet.jar"/>
     </path>
   
     <!-- Build the sysproperties relative to the application home -->
     <syspropertyset id="base.sys.properties">
  -    <sysproperty key="java.endorsed.dirs" file="${app.home}/common/endorsed"/>
  +    <sysproperty key="java.endorsed.dirs" file="${catalina.home}/common/endorsed"/>
       <sysproperty key="java.io.tmpdir" file="${catalina.tmpdir}"/>
  -    <sysproperty key="catalina.home" file="${app.home}"/>
  +    <sysproperty key="catalina.home" file="${catalina.home}"/>
       <sysproperty key="catalina.base" file="${catalina.base}"/>
     </syspropertyset>
   
  @@ -108,6 +110,23 @@
           <syspropertyset refid="base.sys.properties"/>
           <sysproperty key="java.security.manager" value="" if="security"/>
           <sysproperty key="java.security.policy" value="=${catalina.policy}" 
if="security"/>
  +        <classpath refid="base.class.path"/>
  +    </launch>
  +
  +  </target>
  +
  +  <!-- Target that executes the Catalina tool wrapper -->
  +  <target name="tool-wrapper" description="Execute Catalina tool wrapper"
  +    depends="setjdb,setjpda">
  +
  +    <!-- Launch Catalina tool wrapper -->
  +    <launch classname="org.apache.catalina.startup.Tool"
  +      debug="${jdb}"
  +      print="${print}"
  +      usesystemin="false"
  +      requiretools="true">
  +        <jvmargset refid="base.jvm.args"/>
  +        <syspropertyset refid="base.sys.properties"/>
           <classpath refid="base.class.path"/>
       </launch>
   
  
  
  
  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:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to