tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From patri...@apache.org
Subject cvs commit: jakarta-tomcat-catalina/catalina/src/bin catalina.bat catalina.sh cpappend.bat digest.bat digest.sh setclasspath.bat setclasspath.sh shutdown-using-launcher.bat shutdown-using-launcher.sh startup-using-launcher.bat startup-using-launcher.sh tool-wrapper-using-launcher.bat tool-wrapper-using-launcher.sh shutdown.bat shutdown.sh startup.bat startup.sh tool-wrapper.bat tool-wrapper.sh
Date Sun, 04 Aug 2002 18:19:44 GMT
patrickl    2002/08/04 11:19:44

  Modified:    catalina build.xml
               catalina/src/bin shutdown.bat shutdown.sh startup.bat
                        startup.sh tool-wrapper.bat tool-wrapper.sh
  Added:       catalina/src/bin catalina.bat catalina.sh cpappend.bat
                        digest.bat digest.sh setclasspath.bat
                        setclasspath.sh shutdown-using-launcher.bat
                        shutdown-using-launcher.sh
                        startup-using-launcher.bat
                        startup-using-launcher.sh
                        tool-wrapper-using-launcher.bat
                        tool-wrapper-using-launcher.sh
  Log:
  Make use of commons-launcher optional by restoring the old scripts and renaming the commons-launcher
scripts to *-using-launcher.*. The commons-launcher scripts and supporting class and jar files
will only be added to the build if commons-launcher.jar is detected by the build. If commons-launcher.jar
is not detected by the build, only the old scripts will be included in the build.
  
  Revision  Changes    Path
  1.11      +63 -24    jakarta-tomcat-catalina/catalina/build.xml
  
  Index: build.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/build.xml,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- build.xml	1 Aug 2002 21:31:13 -0000	1.10
  +++ build.xml	4 Aug 2002 18:19:43 -0000	1.11
  @@ -157,8 +157,7 @@
        classname="org.apache.commons.launcher.Launcher"
        classpath="${commons-daemon-launcher.jar}"/>
       <available property="launcher.bootstrap.present"
  -     classname="LauncherBootstrap"
  -     classpath="${commons-daemon-launcher-bootstrap.class}"/>
  +     file="${commons-daemon-launcher-bootstrap.class}"/>
       <available property="logging.present"
        classname="org.apache.commons.logging.Log"
        classpath="${commons-logging.jar}"/>
  @@ -231,6 +230,7 @@
        classpath="${xercesImpl.jar}" />
   
       <!-- JAR files availability flags -->
  +    <available property="daemon.jar.present" file="${commons-daemon.jar}" />
       <available property="dbcp.jar.present" file="${commons-dbcp.jar}" />
       <available property="jaas.jar.present" file="${jaas.jar}" />
       <condition property="javamail.jar.present">
  @@ -247,6 +247,12 @@
       <available property="jsse.jar.present" file="${jsse.jar}" />
       <available property="jta.jar.present" file="${jta.jar}" />
       <available property="junit.jar.present" file="${junit.jar}" />
  +    <condition property="launcher.jars.present">
  +      <and>
  +        <equals arg1="${launcher.present}" arg2="true"/>
  +        <equals arg1="${launcher.bootstrap.present}" arg2="true"/>
  +      </and>
  +    </condition>
       <available property="ldap.jar.present" file="${ldap.jar}" />
       <available property="logging.jar.present" file="${commons-logging.jar}" />
       <available property="modeler.jar.present" file="${commons-modeler.jar}" />
  @@ -265,6 +271,12 @@
       </condition>
   
       <!-- Conditional compilation flags (determined from the flags above) -->
  +    <condition property="compile.daemon">
  +      <or>
  +        <equals arg1="${full.dist}" arg2="on" />
  +        <equals arg1="${daemon.present}" arg2="true" />
  +      </or>
  +    </condition>
       <condition property="compile.dbcp">
         <or>
           <equals arg1="${full.dist}" arg2="on" />
  @@ -321,6 +333,15 @@
           <equals arg1="${junit.present}" arg2="true" />
         </or>
       </condition>
  +    <condition property="compile.launcher">
  +      <or>
  +        <equals arg1="${full.dist}" arg2="on" />
  +        <and>
  +          <equals arg1="${launcher.present}" arg2="true" />
  +          <equals arg1="${launcher.bootstrap.present}" arg2="true" />
  +        </and>
  +      </or>
  +    </condition>
       <condition property="compile.ldap">
         <or>
           <equals arg1="${full.dist}" arg2="on" />
  @@ -338,6 +359,12 @@
   
   
       <!-- Conditional copy flags (determined from the flags above) -->
  +    <condition property="copy.daemon.jar">
  +      <or>
  +        <equals arg1="${full.dist}" arg2="on" />
  +        <equals arg1="${daemon.jar.present}" arg2="true" />
  +      </or>
  +    </condition>
       <condition property="copy.dbcp.jar">
         <and>
           <not>
  @@ -428,6 +455,12 @@
           </or>
         </and>
       </condition>
  +    <condition property="copy.launcher.jars">
  +      <or>
  +        <equals arg1="${full.dist}" arg2="on" />
  +        <equals arg1="${launcher.jars.present}" arg2="true" />
  +      </or>
  +    </condition>
       <condition property="copy.ldap.jar">
         <and>
           <not>
  @@ -531,17 +564,15 @@
       <echo message="--- Required Libraries ---" />
       <echo message="beanutils.present=${beanutils.present}" />
       <echo message="collections.present=${collections.present}" />
  -    <echo message="daemon.present=${daemon.present}" />
       <echo message="digester.present=${digester.present}" />
       <echo message="jaxp.present=${jaxp.present}" />
       <echo message="jndi.present=${jndi.present}" />
  -    <echo message="launcher.present=${launcher.present}" />
  -    <echo message="launcher.bootstrap.present=${launcher.bootstrap.present}" />
       <echo message="logging.present=${logging.present}" />
       <echo message="regexp.present=${regexp.present}" />
       <echo message="servlet.present=${servlet.present}" />
   
       <echo message="--- Optional Libraries ---" />
  +    <echo message="daemon.present=${daemon.present}" />
       <echo message="dbcp.present=${dbcp.present}" />
       <echo message="jaas.present=${jaas.present}" />
       <echo message="javamail.present=${javamail.present}" />
  @@ -549,6 +580,8 @@
       <echo message="jsse.present=${jsse.present}" />
       <echo message="jta.present=${jta.present}" />
       <echo message="junit.present=${junit.present}" />
  +    <echo message="launcher.present=${launcher.present}" />
  +    <echo message="launcher.bootstrap.present=${launcher.bootstrap.present}" />
       <echo message="ldap.present=${ldap.present}" />
       <echo message="modeler.present=${modeler.present}" />
       <echo message="pool.present=${pool.present}" />
  @@ -561,6 +594,7 @@
       <echo message="xerces2.jars.present(except JDK 1.4+)=${xerces2.jars.present}" />
   
       <echo message="--- Optional JARs ---" />
  +    <echo message="daemon.jar.present=${daemon.jar.present}" />
       <echo message="dbcp.jar.present=${dbcp.jar.present}" />
       <echo message="jaas.jar.present=${jaas.jar.present}" />
       <echo message="javamail.jar.present=${javamail.jar.present}" />
  @@ -574,6 +608,7 @@
       <echo message="tyrex.jar.present=${tyrex.jar.present}" />
   
       <echo message="--- Conditional compilation flags ---" />
  +    <echo message="compile.daemon=${compile.daemon}" />
       <echo message="compile.dbcp=${compile.dbcp}" />
       <echo message="compile.jaas=${compile.jaas}" />
       <echo message="compile.javamail=${compile.javamail}" />
  @@ -587,6 +622,7 @@
       <echo message="compile.tyrex=${compile.tyrex}" />
   
       <echo message="--- Distribution flags ---" />
  +    <echo message="copy.daemon.jar=${copy.daemon.jar}" />
       <echo message="copy.dbcp.jar=${copy.dbcp.jar}" />
       <echo message="copy.jaas.jar=${copy.jaas.jar}" />
       <echo message="copy.jdbc20ext.jar=${copy.jdbc20ext.jar}" />
  @@ -628,6 +664,9 @@
       <copy todir="${catalina.build}/common/lib" file="${activation.jar}"/>
       <copy todir="${catalina.build}/common/lib" file="${mail.jar}"/>
     </target>
  +  <target name="copy-daemon.jar" if="copy.daemon.jar">
  +    <copy todir="${catalina.build}/bin" file="${commons-daemon.jar}"/>
  +  </target>
     <target name="copy-dbcp.jar" if="copy.dbcp.jar">
       <copy todir="${catalina.build}/common/lib" file="${commons-dbcp.jar}"/>
     </target>
  @@ -647,6 +686,14 @@
     <target name="copy-jta.jar" if="copy.jta.jar">
       <copy todir="${catalina.build}/common/lib" file="${jta.jar}"/>
     </target>
  +  <target name="copy-launcher.jars" if="copy.launcher.jars">
  +    <copy todir="${catalina.build}/common/lib" file="${ant.jar}"/>
  +    <copy todir="${catalina.build}/bin" file="${commons-daemon-launcher.jar}"/>
  +    <copy todir="${catalina.build}/bin" file="${commons-daemon-launcher-bootstrap.class}"/>
  +    <copy todir="${catalina.build}/bin">
  +      <fileset dir="src/bin" includes="*-using-launcher.*,launcher.properties,catalina.xml"
/>
  +    </copy>
  +  </target>
     <target name="copy-ldap.jar" if="copy.ldap.jar">
       <!-- Cannot redistribute LDAP
       <copy todir="${catalina.build}/common/lib" file="${ldap.jar}"/>
  @@ -681,23 +728,15 @@
   
   
     <!-- =================== BUILD: Copy Static Files ======================= -->
  -  <target name="build-static" depends="flags,flags.display,build-prepare,copy-activation.jar,copy-dbcp.jar,copy-jaas.jar,copy-jdbc20ext.jar,copy-jmx.jar,copy-jndi.jar,copy-jsse.jar,copy-jta.jar,copy-ldap.jar,copy-modeler.jar,copy-pool.jar,copy-tyrex.jar,copy-xerces2.jars">
  -
  -    <!-- Copy the launcher classes -->
  -    <copy todir="${catalina.build}/common/lib" file="${ant.jar}"/>
  -    <copy todir="${catalina.build}/bin" file="${commons-daemon.jar}"/>
  -    <copy todir="${catalina.build}/bin" file="${commons-daemon-launcher.jar}"/>
  -    <copy todir="${catalina.build}/bin" file="${commons-daemon-launcher-bootstrap.class}"/>
  +  <target name="build-static" depends="flags,flags.display,build-prepare,copy-activation.jar,copy-daemon.jar,copy-dbcp.jar,copy-jaas.jar,copy-jdbc20ext.jar,copy-jmx.jar,copy-jndi.jar,copy-jsse.jar,copy-jta.jar,copy-launcher.jars,copy-ldap.jar,copy-modeler.jar,copy-pool.jar,copy-tyrex.jar,copy-xerces2.jars">
   
       <!-- Executable Commands -->
       <copy todir="${catalina.build}/bin">
  -      <fileset dir="src/bin" />
  +      <fileset dir="src/bin" excludes="*-using-launcher.*,launcher.properties,catalina.xml"
/>
       </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/startup.sh"/>
  -    <chmod perm="+x" file="${catalina.build}/bin/shutdown.sh"/>
  -    <chmod perm="+x" file="${catalina.build}/bin/tool-wrapper.sh"/>
  +    <chmod perm="+x" dir="${catalina.build}/bin" includes="*.sh"/>
   
       <!-- Common Extensions -->
       <copy todir="${catalina.build}/common/lib" file="${servlet.jar}"/>
  @@ -755,6 +794,8 @@
          unless="jdk.1.3.present"/>
         <exclude name="org/apache/naming/NamingService.java"
          unless="compile.jmx"/>
  +      <exclude name="org/apache/catalina/startup/BootstrapService.java" 
  +       unless="compile.daemon"/>
         <exclude name="org/apache/naming/factory/DbcpDataSourceFactory.java" 
          unless="compile.dbcp"/>
         <exclude name="org/apache/naming/factory/Tyrex*.java" 
  @@ -779,6 +820,8 @@
          unless="compile.jmx"/>
         <exclude name="org/apache/naming/NamingService.java"
          unless="compile.jmx"/>
  +      <exclude name="org/apache/catalina/launcher/**"
  +       unless="compile.launcher"/>
       </javac>
   
       <!-- Copy static resource files -->
  @@ -978,13 +1021,11 @@
   
       <!-- Executable Commands -->
       <copy todir="${catalina.deploy}/bin">
  -      <fileset dir="${catalina.build}/bin" />
  +      <fileset dir="src/bin" excludes="*-using-launcher.*,launcher.properties,catalina.xml"
/>
       </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/startup.sh"/>
  -    <chmod perm="+x" file="${catalina.deploy}/bin/shutdown.sh"/>
  -    <chmod perm="+x" file="${catalina.deploy}/bin/tool-wrapper.sh"/>
  +    <chmod perm="+x" dir="${catalina.build}/bin" includes="*.sh"/>
   
       <!-- Common Extensions -->
       <copy todir="${catalina.deploy}/common/endorsed">
  @@ -1153,13 +1194,11 @@
       <!-- Executable Commands -->
       <mkdir dir="${catalina.dist}/bin"/>
       <copy todir="${catalina.dist}/bin">
  -      <fileset dir="${catalina.build}/bin" />
  +      <fileset dir="src/bin" excludes="*-using-launcher.*,launcher.properties,catalina.xml"
/>
       </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/startup.sh"/>
  -    <chmod perm="+x" file="${catalina.dist}/bin/shutdown.sh"/>
  -    <chmod perm="+x" file="${catalina.dist}/bin/tool-wrapper.sh"/>
  +    <chmod perm="+x" dir="${catalina.build}/bin" includes="*.sh"/>
   
       <!-- Common Extensions -->    
       <mkdir dir="${catalina.dist}/common/classes"/>
  
  
  
  1.3       +22 -21    jakarta-tomcat-catalina/catalina/src/bin/shutdown.bat
  
  Index: shutdown.bat
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/bin/shutdown.bat,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- shutdown.bat	1 Aug 2002 04:59:24 -0000	1.2
  +++ shutdown.bat	4 Aug 2002 18:19:43 -0000	1.3
  @@ -1,31 +1,33 @@
   @echo off
   if "%OS%" == "Windows_NT" setlocal
  -
   rem ---------------------------------------------------------------------------
  +rem Stop script for the CATALINA Server
   rem
  -rem Script for shutting down Catalina using the Launcher
  -rem
  +rem $Id$
   rem ---------------------------------------------------------------------------
   
  -rem Get standard environment variables
  -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
  +rem Guess CATALINA_HOME if not defined
  +if not "%CATALINA_HOME%" == "" goto gotHome
  +set CATALINA_HOME=.
  +if exist "%CATALINA_HOME%\bin\catalina.bat" goto okHome
  +set CATALINA_HOME=..
  +:gotHome
  +if exist "%CATALINA_HOME%\bin\catalina.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
  -:gotJavaHome
  +:okHome
  +
  +set EXECUTABLE=%CATALINA_HOME%\bin\catalina.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
  +goto end
  +:okExec
   
  -rem Get command line arguments and save them with the proper quoting
  +rem Get remaining unshifted command line arguments and save them in the
   set CMD_LINE_ARGS=
   :setArgs
   if ""%1""=="""" goto doneSetArgs
  @@ -34,7 +36,6 @@
   goto setArgs
   :doneSetArgs
   
  -rem Execute the Launcher using the "catalina" target
  -"%JAVA_HOME%\bin\java.exe" -classpath %PRG%\..;"%PATH%" LauncherBootstrap -launchfile catalina.xml
-verbose catalina %CMD_LINE_ARGS% stop
  +call "%EXECUTABLE%" stop %CMD_LINE_ARGS%
   
   :end
  
  
  
  1.3       +13 -11    jakarta-tomcat-catalina/catalina/src/bin/shutdown.sh
  
  Index: shutdown.sh
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/bin/shutdown.sh,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- shutdown.sh	1 Aug 2002 04:59:24 -0000	1.2
  +++ shutdown.sh	4 Aug 2002 18:19:43 -0000	1.3
  @@ -1,15 +1,14 @@
   #!/bin/sh
  -
   # -----------------------------------------------------------------------------
  +# Stop script for the CATALINA Server
   #
  -# Script for shutting down Catalina using the Launcher
  -#
  +# $Id$
   # -----------------------------------------------------------------------------
   
  -# Resolve links - $0 may be a softlink
  +# resolve links - $0 may be a softlink
   PRG="$0"
   
  -while [ -h "$PRG" ]; do
  +while [ -h "$PRG" ] ; do
     ls=`ls -ld "$PRG"`
     link=`expr "$ls" : '.*-> \(.*\)$'`
     if expr "$link" : '.*/.*' > /dev/null; then
  @@ -18,12 +17,15 @@
       PRG=`dirname "$PRG"`/"$link"
     fi
   done
  -
  -# Get standard environment variables
  + 
   PRGDIR=`dirname "$PRG"`
  -if [ -r "$PRGDIR"/setenv.sh ]; then
  -  . "$PRGDIR"/setenv.sh
  +EXECUTABLE=catalina.sh
  +
  +# Check that target executable exists
  +if [ ! -x "$PRGDIR"/"$EXECUTABLE" ]; then
  +  echo "Cannot find $PRGDIR/$EXECUTABLE"
  +  echo "This file is needed to run this program"
  +  exit 1
   fi
   
  -# Execute the Launcher using the "catalina" target
  -exec "$JAVA_HOME"/bin/java -classpath "$PRGDIR" LauncherBootstrap -launchfile catalina.xml
-verbose catalina "$@" stop
  +exec "$PRGDIR"/"$EXECUTABLE" stop "$@"
  
  
  
  1.4       +22 -20    jakarta-tomcat-catalina/catalina/src/bin/startup.bat
  
  Index: startup.bat
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/bin/startup.bat,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- startup.bat	2 Aug 2002 01:38:14 -0000	1.3
  +++ startup.bat	4 Aug 2002 18:19:43 -0000	1.4
  @@ -1,30 +1,33 @@
   @echo off
   if "%OS%" == "Windows_NT" setlocal
  -
   rem ---------------------------------------------------------------------------
  +rem Start script for the CATALINA Server
   rem
  -rem Script for starting Catalina using the Launcher
  -rem
  +rem $Id$
   rem ---------------------------------------------------------------------------
   
  -rem Get standard environment variables
  -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%
  -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
  +rem Guess CATALINA_HOME if not defined
  +if not "%CATALINA_HOME%" == "" goto gotHome
  +set CATALINA_HOME=.
  +if exist "%CATALINA_HOME%\bin\catalina.bat" goto okHome
  +set CATALINA_HOME=..
  +:gotHome
  +if exist "%CATALINA_HOME%\bin\catalina.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
  -:gotJavaHome
  +:okHome
  +
  +set EXECUTABLE=%CATALINA_HOME%\bin\catalina.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
  +goto end
  +:okExec
   
  -rem Get command line arguments and save them with the proper quoting
  +rem Get remaining unshifted command line arguments and save them in the
   set CMD_LINE_ARGS=
   :setArgs
   if ""%1""=="""" goto doneSetArgs
  @@ -33,7 +36,6 @@
   goto setArgs
   :doneSetArgs
   
  -rem Execute the Launcher using the "catalina" target
  -"%JAVA_HOME%\bin\java.exe" -classpath %PRG%\..;"%PATH%" LauncherBootstrap -launchfile catalina.xml
-verbose catalina %CMD_LINE_ARGS% start
  +call "%EXECUTABLE%" start %CMD_LINE_ARGS%
   
   :end
  
  
  
  1.3       +13 -11    jakarta-tomcat-catalina/catalina/src/bin/startup.sh
  
  Index: startup.sh
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/bin/startup.sh,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- startup.sh	1 Aug 2002 04:59:24 -0000	1.2
  +++ startup.sh	4 Aug 2002 18:19:43 -0000	1.3
  @@ -1,15 +1,14 @@
   #!/bin/sh
  -
   # -----------------------------------------------------------------------------
  +# Start Script for the CATALINA Server
   #
  -# Script for starting Catalina using the Launcher
  -#
  +# $Id$
   # -----------------------------------------------------------------------------
   
  -# Resolve links - $0 may be a softlink
  +# resolve links - $0 may be a softlink
   PRG="$0"
   
  -while [ -h "$PRG" ]; do
  +while [ -h "$PRG" ] ; do
     ls=`ls -ld "$PRG"`
     link=`expr "$ls" : '.*-> \(.*\)$'`
     if expr "$link" : '.*/.*' > /dev/null; then
  @@ -18,12 +17,15 @@
       PRG=`dirname "$PRG"`/"$link"
     fi
   done
  -
  -# Get standard environment variables
  + 
   PRGDIR=`dirname "$PRG"`
  -if [ -r "$PRGDIR"/setenv.sh ]; then
  -  . "$PRGDIR"/setenv.sh
  +EXECUTABLE=catalina.sh
  +
  +# Check that target executable exists
  +if [ ! -x "$PRGDIR"/"$EXECUTABLE" ]; then
  +  echo "Cannot find $PRGDIR/$EXECUTABLE"
  +  echo "This file is needed to run this program"
  +  exit 1
   fi
   
  -# Execute the Launcher using the "catalina" target
  -exec "$JAVA_HOME"/bin/java -classpath "$PRGDIR" LauncherBootstrap -launchfile catalina.xml
-verbose catalina "$@" start
  +exec "$PRGDIR"/"$EXECUTABLE" start "$@"
  
  
  
  1.3       +39 -20    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.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- tool-wrapper.bat	1 Aug 2002 18:02:07 -0000	1.2
  +++ tool-wrapper.bat	4 Aug 2002 18:19:43 -0000	1.3
  @@ -1,31 +1,51 @@
   @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 Script for running the Catalina tool wrapper using the Launcher
  +rem   TOOL_OPTS     (Optional) Java runtime options used when the "start",
  +rem                 "stop", or "run" command is executed.
   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 Get standard environment variables
  -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
  +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
  -:gotJavaHome
  +: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
  +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
   
  -rem Get command line arguments and save them with the proper quoting
  +rem Get remaining unshifted command line arguments and save them in the
   set CMD_LINE_ARGS=
   :setArgs
   if ""%1""=="""" goto doneSetArgs
  @@ -34,7 +54,6 @@
   goto setArgs
   :doneSetArgs
   
  -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%
  +%_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%
   
   :end
  
  
  
  1.3       +56 -7     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.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- tool-wrapper.sh	1 Aug 2002 18:02:07 -0000	1.2
  +++ tool-wrapper.sh	4 Aug 2002 18:19:43 -0000	1.3
  @@ -1,12 +1,29 @@
   #!/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.
   #
  -# Script for running the Catalina tool wrapper using the Launcher
  +#   JAVA_HOME     Must point at your Java Development Kit installation.
   #
  +#   JAVA_OPTS     (Optional) Java runtime options used when the "start",
  +#                 "stop", or "run" command is executed.
  +#
  +# $Id$
   # -----------------------------------------------------------------------------
   
  -# Resolve links - $0 may be a softlink
  +# 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
   PRG="$0"
   
   while [ -h "$PRG" ]; do
  @@ -21,9 +38,41 @@
   
   # Get standard environment variables
   PRGDIR=`dirname "$PRG"`
  -if [ -r "$PRGDIR"/setenv.sh ]; then
  -  . "$PRGDIR"/setenv.sh
  +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
   fi
   
  -# Execute the Launcher using the "tool-wrapper" target
  -exec "$JAVA_HOME"/bin/java -classpath "$PRGDIR" LauncherBootstrap -launchfile catalina.xml
-verbose tool-wrapper "$@"
  +# 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 "$@"
  
  
  
  1.3       +1 -1      jakarta-tomcat-catalina/catalina/src/bin/catalina.bat
  
  
  
  
  1.3       +1 -1      jakarta-tomcat-catalina/catalina/src/bin/catalina.sh
  
  
  
  
  1.3       +1 -1      jakarta-tomcat-catalina/catalina/src/bin/cpappend.bat
  
  
  
  
  1.3       +1 -1      jakarta-tomcat-catalina/catalina/src/bin/digest.bat
  
  
  
  
  1.3       +1 -1      jakarta-tomcat-catalina/catalina/src/bin/digest.sh
  
  
  
  
  1.3       +1 -1      jakarta-tomcat-catalina/catalina/src/bin/setclasspath.bat
  
  
  
  
  1.3       +1 -1      jakarta-tomcat-catalina/catalina/src/bin/setclasspath.sh
  
  
  
  
  1.1                  jakarta-tomcat-catalina/catalina/src/bin/shutdown-using-launcher.bat
  
  Index: shutdown-using-launcher.bat
  ===================================================================
  @echo off
  if "%OS%" == "Windows_NT" setlocal
  
  rem ---------------------------------------------------------------------------
  rem
  rem Script for shutting down Catalina using the Launcher
  rem
  rem ---------------------------------------------------------------------------
  
  rem Get standard environment variables
  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
  :gotJavaHome
  
  rem Get command line arguments and save them with the proper quoting
  set CMD_LINE_ARGS=
  :setArgs
  if ""%1""=="""" goto doneSetArgs
  set CMD_LINE_ARGS=%CMD_LINE_ARGS% %1
  shift
  goto setArgs
  :doneSetArgs
  
  rem Execute the Launcher using the "catalina" target
  "%JAVA_HOME%\bin\java.exe" -classpath %PRG%\..;"%PATH%" LauncherBootstrap -launchfile catalina.xml
-verbose catalina %CMD_LINE_ARGS% stop
  
  :end
  
  
  
  1.1                  jakarta-tomcat-catalina/catalina/src/bin/shutdown-using-launcher.sh
  
  Index: shutdown-using-launcher.sh
  ===================================================================
  #!/bin/sh
  
  # -----------------------------------------------------------------------------
  #
  # Script for shutting down Catalina using the Launcher
  #
  # -----------------------------------------------------------------------------
  
  # Resolve links - $0 may be a softlink
  PRG="$0"
  
  while [ -h "$PRG" ]; do
    ls=`ls -ld "$PRG"`
    link=`expr "$ls" : '.*-> \(.*\)$'`
    if expr "$link" : '.*/.*' > /dev/null; then
      PRG="$link"
    else
      PRG=`dirname "$PRG"`/"$link"
    fi
  done
  
  # Get standard environment variables
  PRGDIR=`dirname "$PRG"`
  if [ -r "$PRGDIR"/setenv.sh ]; then
    . "$PRGDIR"/setenv.sh
  fi
  
  # Execute the Launcher using the "catalina" target
  exec "$JAVA_HOME"/bin/java -classpath "$PRGDIR" LauncherBootstrap -launchfile catalina.xml
-verbose catalina "$@" stop
  
  
  
  1.1                  jakarta-tomcat-catalina/catalina/src/bin/startup-using-launcher.bat
  
  Index: startup-using-launcher.bat
  ===================================================================
  @echo off
  if "%OS%" == "Windows_NT" setlocal
  
  rem ---------------------------------------------------------------------------
  rem
  rem Script for starting Catalina using the Launcher
  rem
  rem ---------------------------------------------------------------------------
  
  rem Get standard environment variables
  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%
  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
  :gotJavaHome
  
  rem Get command line arguments and save them with the proper quoting
  set CMD_LINE_ARGS=
  :setArgs
  if ""%1""=="""" goto doneSetArgs
  set CMD_LINE_ARGS=%CMD_LINE_ARGS% %1
  shift
  goto setArgs
  :doneSetArgs
  
  rem Execute the Launcher using the "catalina" target
  "%JAVA_HOME%\bin\java.exe" -classpath %PRG%\..;"%PATH%" LauncherBootstrap -launchfile catalina.xml
-verbose catalina %CMD_LINE_ARGS% start
  
  :end
  
  
  
  1.1                  jakarta-tomcat-catalina/catalina/src/bin/startup-using-launcher.sh
  
  Index: startup-using-launcher.sh
  ===================================================================
  #!/bin/sh
  
  # -----------------------------------------------------------------------------
  #
  # Script for starting Catalina using the Launcher
  #
  # -----------------------------------------------------------------------------
  
  # Resolve links - $0 may be a softlink
  PRG="$0"
  
  while [ -h "$PRG" ]; do
    ls=`ls -ld "$PRG"`
    link=`expr "$ls" : '.*-> \(.*\)$'`
    if expr "$link" : '.*/.*' > /dev/null; then
      PRG="$link"
    else
      PRG=`dirname "$PRG"`/"$link"
    fi
  done
  
  # Get standard environment variables
  PRGDIR=`dirname "$PRG"`
  if [ -r "$PRGDIR"/setenv.sh ]; then
    . "$PRGDIR"/setenv.sh
  fi
  
  # Execute the Launcher using the "catalina" target
  exec "$JAVA_HOME"/bin/java -classpath "$PRGDIR" LauncherBootstrap -launchfile catalina.xml
-verbose catalina "$@" start
  
  
  
  1.1                  jakarta-tomcat-catalina/catalina/src/bin/tool-wrapper-using-launcher.bat
  
  Index: tool-wrapper-using-launcher.bat
  ===================================================================
  @echo off
  if "%OS%" == "Windows_NT" setlocal
  
  rem ---------------------------------------------------------------------------
  rem
  rem Script for running the Catalina tool wrapper using the Launcher
  rem
  rem ---------------------------------------------------------------------------
  
  rem Get standard environment variables
  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
  :gotJavaHome
  
  rem Get command line arguments and save them with the proper quoting
  set CMD_LINE_ARGS=
  :setArgs
  if ""%1""=="""" goto doneSetArgs
  set CMD_LINE_ARGS=%CMD_LINE_ARGS% %1
  shift
  goto setArgs
  :doneSetArgs
  
  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.1                  jakarta-tomcat-catalina/catalina/src/bin/tool-wrapper-using-launcher.sh
  
  Index: tool-wrapper-using-launcher.sh
  ===================================================================
  #!/bin/sh
  
  # -----------------------------------------------------------------------------
  #
  # Script for running the Catalina tool wrapper using the Launcher
  #
  # -----------------------------------------------------------------------------
  
  # Resolve links - $0 may be a softlink
  PRG="$0"
  
  while [ -h "$PRG" ]; do
    ls=`ls -ld "$PRG"`
    link=`expr "$ls" : '.*-> \(.*\)$'`
    if expr "$link" : '.*/.*' > /dev/null; then
      PRG="$link"
    else
      PRG=`dirname "$PRG"`/"$link"
    fi
  done
  
  # Get standard environment variables
  PRGDIR=`dirname "$PRG"`
  if [ -r "$PRGDIR"/setenv.sh ]; then
    . "$PRGDIR"/setenv.sh
  fi
  
  # 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:tomcat-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-dev-help@jakarta.apache.org>


Mime
View raw message