tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hor...@locus.apache.org
Subject cvs commit: jakarta-tomcat-4.0/webapps/examples build.bat build.sh build.xml
Date Mon, 21 Aug 2000 18:30:26 GMT
horwat      00/08/21 11:30:26

  Added:       webapps  build.bat build.sh build.xml
               webapps/examples build.bat build.sh build.xml
  Log:
  webapps build scripts
  
  Revision  Changes    Path
  1.1                  jakarta-tomcat-4.0/webapps/build.bat
  
  Index: build.bat
  ===================================================================
  @echo off
  rem ---------------------------------------------------------------------------
  rem build.bat - Build Script for webapps
  rem
  rem Environment Variable Prerequisites:
  rem
  rem   ANT_HOME         Must point at your Ant installation [../../jakarta-ant]
  rem
  rem   ANT_OPTS         Command line options to the Java runtime
  rem                    that executes Ant [NONE]
  rem
  rem   JAVA_HOME        Must point at your Java Development Kit [REQUIRED]
  rem
  rem   JAXP_HOME        Must point at your JAXP installation 
  rem
  rem   SERVLETAPI_HOME  Must point at your "jakarta-servletapi" installation.
  rem                    [../../jakarta-servletapi]
  rem
  rem $Id: build.bat,v 1.1 2000/08/21 18:30:25 horwat Exp $
  rem ---------------------------------------------------------------------------
  
  
  rem ----- Save Environment Variables ------------------------------------------
  
  set _ANT_HOME=%ANT_HOME%
  set _CLASSPATH=%CLASSPATH%
  set _SERVLETAPI_HOME=%SERVLETAPI_HOME%
  
  
  rem ----- Verify and Set Required Environment Variables -----------------------
  
  if not "%JAVA_HOME%" == "" goto gotJavaHome
  echo You must set JAVA_HOME to point at your Java Development Kit installation
  goto cleanup
  :gotJavaHome
  
  if not "%ANT_HOME%" == "" goto gotAntHome
  set ANT_HOME=../../jakarta-ant
  :gotAntHome
  
  if not "%SERVLETAPI_HOME%" == "" goto gotServletapiHome
  set SERVLETAPI_HOME=../../jakarta-servletapi
  :gotServletapiHome
  
  
  rem ----- Set Up The Runtime Classpath ----------------------------------------
  
  if not "%CLASSPATH%" == "" set CLASSPATH=%CLASSPATH%;
  set CLASSPATH=%CLASSPATH%;%ANT_HOME%\lib\ant.jar;%JAVA_HOME%\lib\tools.jar
  
  
  rem ----- Execute The Requested Build -----------------------------------------
  
  java %ANT_OPTS% org.apache.tools.ant.Main -Dant.home=%ANT_HOME% -Djaxp.home="%JAXP_HOME%"
-Dservletapi.home=%SERVLETAPI_HOME% %1 %2 %3 %4 %5 %6 %7 %8 %9
  
  
  rem ----- Restore Environment Variables ---------------------------------------
  
  :cleanup
  set SERVLETAPI_HOME=%_SERVLETAPIHOME%
  set _SERVLETAPIHOME=
  set CLASSPATH=%_CLASSPATH%
  set _CLASSPATH=
  set ANT_HOME=%_ANT_HOME%
  set _ANT_HOME=
  :finish
  
  
  
  1.1                  jakarta-tomcat-4.0/webapps/build.sh
  
  Index: build.sh
  ===================================================================
  #!/bin/sh
  # -----------------------------------------------------------------------------
  # build.sh - Build Script for webapps
  #
  # Environment Variable Prerequisites:
  #
  #   ANT_HOME         Must point at your Ant installation [../../jakarta-ant]
  #
  #   ANT_OPTS         Command line options to the Java runtime
  #                    that executes Ant [NONE]
  #
  #   JAVA_HOME        Must point at your Java Development Kit [REQUIRED]
  #
  #   JAXP_HOME        Must point at your JAXP installation
  #
  #   SERVLETAPI_HOME  Must point at your "jakarta-servletapi" installation.
  #                    [../../jakarta-servletapi]
  #
  # $Id: build.sh,v 1.1 2000/08/21 18:30:25 horwat Exp $
  # -----------------------------------------------------------------------------
  
  
  # ----- Verify and Set Required Environment Variables -------------------------
  
  if [ "$ANT_HOME" = "" ] ; then
    ANT_HOME=../../jakarta-ant
  fi
  
  if [ "$ANT_OPTS" = "" ] ; then
    ANT_OPTS=""
  fi
  
  if [ "$JAVA_HOME" = "" ] ; then
    echo You must set JAVA_HOME to point at your Java Development Kit install
    exit 1
  fi
  
  if [ "$SERVLETAPI_HOME" = "" ] ; then
    SERVLETAPI_HOME=../../jakarta-servletapi
  fi
  
  
  # ----- Set Up The Runtime Classpath ------------------------------------------
  
  CP=$ANT_HOME/lib/ant.jar:$JAVA_HOME/lib/tools.jar
  if [ "$CLASSPATH" != "" ] ; then
    CP=$CLASSPATH:$CP
  fi
  
  
  # ----- Execute The Requested Build -------------------------------------------
  
  java $ANT_OPTS -classpath $CP org.apache.tools.ant.Main -Dant.home=$ANT_HOME -Djaxp.home=$JAXP_HOME
-Dservletapi.home=$SERVLETAPI_HOME "$@"
  
  
  
  
  1.1                  jakarta-tomcat-4.0/webapps/build.xml
  
  Index: build.xml
  ===================================================================
  <project name="Webapps" default="dist" basedir=".">
  
  
    <!-- ===================== Initialize Property Values =================== -->
    <property name="ant.home"        value="../../jakarta-ant"/>
    <property name="build.compiler"  value="classic"/>
    <property name="webapps.build"   value="../../build/webapps"/>
    <property name="webapps.dist"    value="../../dist/webapps"/>
    <property name="servletapi.home" value="../../jakarta-servletapi"/>
  
    <!-- ================== Derived Property Values ========================= -->
    <property name="servlet.jar"     value="${servletapi.home}/lib/servlet.jar"/>
  
  
    <!-- =================== BUILD: Create Directories ====================== -->
    <target name="build-prepare">
      <mkdir dir="${webapps.build}"/>
      <mkdir dir="${webapps.build}/"/>
    </target>
  
  
    <!-- =================== BUILD: Compile Subprojects ===================== -->
    <!-- Add a new target for each webapp subproject -->
  
    <target name="examples">
      <ant dir="./examples" target="dist"/>
    </target>
  
    <target name="examples-deploy">
      <ant dir="./examples" target="deploy"/>
    </target>
  
    <target name="examples-deploydist">
      <ant dir="./examples" target="deploy-dist"/>
    </target>
  
    <!-- ================= BUILD: Compile Server Components ================= -->
    <target name="build" depends="build-prepare,examples"/>
  
    <!-- ================= BUILD: Create Distribution Files ================= -->
    <target name="dist" depends="build-prepare,examples"/>
  
    <!-- ================= BUILD: Deploy Webapps Projects =================== -->
    <target name="deploy" depends="examples-deploy"/>
  
    <!-- ================= BUILD: Deploy Webapps Distribution Files ========= -->
    <target name="deploy-dist" depends="examples-deploydist"/>
  
    <!-- ======================= BUILD: Clean Directory ===================== -->
    <target name="build-clean">
      <deltree dir="${webapps.build}"/>
      <deltree dir="${webapps.dist}"/>
    </target>
  
    <!-- ==================== BUILD: Rebuild Everything ===================== -->
    <target name="all" depends="build-clean,dist"/>
  
    <!-- ====================== Convenient Synonyms ========================= -->
    <target name="clean" depends="build-clean"/>
  
  </project>
  
  
  
  1.1                  jakarta-tomcat-4.0/webapps/examples/build.bat
  
  Index: build.bat
  ===================================================================
  @echo off
  rem ---------------------------------------------------------------------------
  rem build.bat - Build Script for webapps
  rem
  rem Environment Variable Prerequisites:
  rem
  rem   ANT_HOME         Must point at your Ant installation [../../jakarta-ant]
  rem
  rem   ANT_OPTS         Command line options to the Java runtime
  rem                    that executes Ant [NONE]
  rem
  rem   JAVA_HOME        Must point at your Java Development Kit [REQUIRED]
  rem
  rem   JAXP_HOME        Must point at your JAXP installation 
  rem
  rem   SERVLETAPI_HOME  Must point at your "jakarta-servletapi" installation.
  rem                    [../../jakarta-servletapi]
  rem
  rem $Id: build.bat,v 1.1 2000/08/21 18:30:26 horwat Exp $
  rem ---------------------------------------------------------------------------
  
  
  rem ----- Save Environment Variables ------------------------------------------
  
  set _ANT_HOME=%ANT_HOME%
  set _CLASSPATH=%CLASSPATH%
  set _SERVLETAPI_HOME=%SERVLETAPI_HOME%
  
  
  rem ----- Verify and Set Required Environment Variables -----------------------
  
  if not "%JAVA_HOME%" == "" goto gotJavaHome
  echo You must set JAVA_HOME to point at your Java Development Kit installation
  goto cleanup
  :gotJavaHome
  
  if not "%ANT_HOME%" == "" goto gotAntHome
  set ANT_HOME=../../jakarta-ant
  :gotAntHome
  
  if not "%SERVLETAPI_HOME%" == "" goto gotServletapiHome
  set SERVLETAPI_HOME=../../jakarta-servletapi
  :gotServletapiHome
  
  
  rem ----- Set Up The Runtime Classpath ----------------------------------------
  
  if not "%CLASSPATH%" == "" set CLASSPATH=%CLASSPATH%;
  set CLASSPATH=%CLASSPATH%;%ANT_HOME%\lib\ant.jar;%JAVA_HOME%\lib\tools.jar
  
  
  rem ----- Execute The Requested Build -----------------------------------------
  
  java %ANT_OPTS% org.apache.tools.ant.Main -Dant.home=%ANT_HOME% -Djaxp.home="%JAXP_HOME%"
-Dservletapi.home=%SERVLETAPI_HOME% %1 %2 %3 %4 %5 %6 %7 %8 %9
  
  
  rem ----- Restore Environment Variables ---------------------------------------
  
  :cleanup
  set SERVLETAPI_HOME=%_SERVLETAPIHOME%
  set _SERVLETAPIHOME=
  set CLASSPATH=%_CLASSPATH%
  set _CLASSPATH=
  set ANT_HOME=%_ANT_HOME%
  set _ANT_HOME=
  :finish
  
  
  
  1.1                  jakarta-tomcat-4.0/webapps/examples/build.sh
  
  Index: build.sh
  ===================================================================
  #!/bin/sh
  # -----------------------------------------------------------------------------
  # build.sh - Build Script for webapps
  #
  # Environment Variable Prerequisites:
  #
  #   ANT_HOME         Must point at your Ant installation [../../jakarta-ant]
  #
  #   ANT_OPTS         Command line options to the Java runtime
  #                    that executes Ant [NONE]
  #
  #   JAVA_HOME        Must point at your Java Development Kit [REQUIRED]
  #
  #   JAXP_HOME        Must point at your JAXP installation
  #
  #   SERVLETAPI_HOME  Must point at your "jakarta-servletapi" installation.
  #                    [../../jakarta-servletapi]
  #
  # $Id: build.sh,v 1.1 2000/08/21 18:30:26 horwat Exp $
  # -----------------------------------------------------------------------------
  
  
  # ----- Verify and Set Required Environment Variables -------------------------
  
  if [ "$ANT_HOME" = "" ] ; then
    ANT_HOME=../../jakarta-ant
  fi
  
  if [ "$ANT_OPTS" = "" ] ; then
    ANT_OPTS=""
  fi
  
  if [ "$JAVA_HOME" = "" ] ; then
    echo You must set JAVA_HOME to point at your Java Development Kit install
    exit 1
  fi
  
  if [ "$SERVLETAPI_HOME" = "" ] ; then
    SERVLETAPI_HOME=../../jakarta-servletapi
  fi
  
  
  # ----- Set Up The Runtime Classpath ------------------------------------------
  
  CP=$ANT_HOME/lib/ant.jar:$JAVA_HOME/lib/tools.jar
  if [ "$CLASSPATH" != "" ] ; then
    CP=$CLASSPATH:$CP
  fi
  
  
  # ----- Execute The Requested Build -------------------------------------------
  
  java $ANT_OPTS -classpath $CP org.apache.tools.ant.Main -Dant.home=$ANT_HOME -Djaxp.home=$JAXP_HOME
-Dservletapi.home=$SERVLETAPI_HOME "$@"
  
  
  
  
  1.1                  jakarta-tomcat-4.0/webapps/examples/build.xml
  
  Index: build.xml
  ===================================================================
  <project name="examples" default="build-main" basedir=".">
  
  
    <!-- ===================== Initialize Property Values =================== -->
    <property name="ant.home"        value="../../../jakarta-ant"/>
    <property name="build.compiler"  value="classic"/>
    <property name="servletapi.home" value="../../../jakarta-servletapi"/>
    <property name="build.dir"       value="../../../build/webapps"/>
    <property name="dist.dir"        value="../../../dist/webapps"/>
    <property name="deploy.dir"      value="../../../build/catalina/webapps"/>
    <property name="deploy-dist.dir" value="../../../dist/catalina/webapps"/>
  
    <property name="webapps.name"    value="examples"/>
    <property name="webapps.src"     value="WEB-INF"/>
    <property name="jsp.src"         value="jsp"/>
    <property name="servlets.src"    value="servlets"/>
    <property name="images.src"      value="images"/>
  
    <!-- ================== Derived Property Values ========================= -->
    <property name="servlet.jar"     value="${servletapi.home}/lib/servlet.jar"/>
  
  
    <!-- =================== BUILD: Create Directories ====================== -->
    <target name="build-prepare">
      <!-- Set up build directories -->
      <mkdir dir="${build.dir}/${webapps.name}"/>
  
      <!-- Set up distribution directories -->
      <mkdir dir="${dist.dir}/${webapps.name}"/>
    </target>
  
  
    <!-- ================= BUILD: Compile Server Components ================= -->
    <target name="build-main" depends="build-prepare">
  
      <copydir src="${webapps.src}" 
               dest="${build.dir}/${webapps.name}/${webapps.src}"/>
      <copydir src="${jsp.src}" 
               dest="${build.dir}/${webapps.name}/${jsp.src}"/>
      <copydir src="${servlets.src}" 
               dest="${build.dir}/${webapps.name}/${servlets.src}"/>
      <copydir src="${images.src}" 
               dest="${build.dir}/${webapps.name}/${images.src}"/>
  
      <!-- Compile internal server components -->
      <javac   srcdir="WEB-INF/classes" 
               destdir="${build.dir}/${webapps.name}/WEB-INF/classes"
               classpath="${servlet.jar}"
               deprecation="off" debug="on" optimize="off"
               excludes="**/CVS/**"/>
      <javac   srcdir="jsp/plugin/applet" 
               destdir="${build.dir}/${webapps.name}/jsp/plugin/applet"
               classpath="${servlet.jar}"
               deprecation="off" debug="on" optimize="off"
               excludes="**/CVS/**"/>
  
    </target>
  
    <!-- ======================= DIST: Create Distribution Files ============ -->
    <target name="dist" depends="build-main">
      <!-- Create webapp WARS -->
        <jar   jarfile="${dist.dir}/${webapps.name}/${webapps.name}.war"
               basedir="${build.dir}/${webapps.name}" includes="**"/>
    </target>
  
  
    <!-- ======================= BUILD: Deploy Build ======================== -->
    <target name="deploy" depends="build-main">
      <copydir  src="${build.dir}/${webapps.name}"
                dest="${deploy.dir}/${webapps.name}">
      </copydir>
    </target>
  
    <!-- ======================= BUILD: Deploy Distribution Files =========== -->
    <target name="deploy-dist" depends="dist">
      <copydir  src="${dist.dir}/${webapps.name}"
                dest="${deploy-dist.dir}">
      </copydir>
    </target>
  
    <!-- ======================= BUILD: Clean Directory ===================== -->
    <target name="build-clean">
      <deltree dir="${build.dir}/${webapps.name}"/>
      <deltree dir="${dist.dir}/${webapps.name}"/>
    </target>
  
    <!-- ==================== BUILD: Rebuild Everything ===================== -->
    <target name="all" depends="build-clean,build-main"/>
  
    <!-- ====================== Convenient Synonyms ========================= -->
    <target name="clean" depends="build-clean"/>
  
  
  </project>
  
  
  

Mime
View raw message