tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gl...@apache.org
Subject cvs commit: jakarta-tomcat-4.0 build.xml
Date Wed, 26 Dec 2001 01:21:51 GMT
glenn       01/12/25 17:21:51

  Modified:    .        build.xml
  Log:
  <project name="Catalina" default="deploy" basedir=".">
  
    <!-- ===================== Initialize Property Values =================== -->
  
    <!-- See "build.properties.sample" in the top level directory for all     -->
    <!-- property values you must customize for successful building!!!        -->
    <property file="build.properties"/>
    <property file="../build.properties"/>
    <property file="${user.home}/build.properties"/>
  
    <!-- Build Defaults -->
    <property name="build.compiler"    value="classic"/>
    <property name="catalina.build"    value="${basedir}/build"/>
    <property name="catalina.deploy"   value="${basedir}/../build"/>
    <property name="catalina.dist"     value="${basedir}/dist"/>
    <property name="test.failonerror"  value="true"/>
    <property name="test.runner"       value="junit.textui.TestRunner"/>
    <property name="test.webapp"       value="../webapps/build/examples"/>
    <property name="test.webapp.war"   value="${java.io.tmpdir}/webapp.war"/>
  
    <!-- Construct Catalina classpath -->
    <path id="catalina.classpath">
      <pathelement location="${activation.jar}"/>
      <pathelement location="${commons-beanutils.jar}"/>
      <pathelement location="${commons-collections.jar}"/>
      <pathelement location="${commons-dbcp.jar}"/>
      <pathelement location="${commons-digester.jar}"/>
      <pathelement location="${commons-modeler.jar}"/>
      <pathelement location="${commons-pool.jar}"/>
      <pathelement location="${jaas.jar}"/>
      <pathelement location="${jcert.jar}"/>
      <pathelement location="${jdbc20ext.jar}"/>
      <pathelement location="${jmxri.jar}"/>
      <pathelement location="${jmxtools.jar}"/>
      <pathelement location="${jndi.jar}"/>
      <pathelement location="${jnet.jar}"/>
      <pathelement location="${jsse.jar}"/>
      <pathelement location="${jta.jar}"/>
      <pathelement location="${ldap.jar}"/>
      <pathelement location="${mail.jar}"/>
      <pathelement location="${regexp.jar}"/>
      <pathelement location="${servlet.jar}"/>
      <pathelement location="${tyrex.jar}"/>
      <pathelement location="${xerces.jar}"/>
      <pathelement location="${catalina.build}/server/classes"/>
    </path>
  
    <!-- Construct unit tests classpath -->
    <path id="test.classpath">
      <pathelement location="${junit.jar}"/>
      <pathelement location="${activation.jar}"/>
      <pathelement location="${commons-beanutils.jar}"/>
      <pathelement location="${commons-collections.jar}"/>
      <pathelement location="${commons-dbcp.jar}"/>
      <pathelement location="${commons-digester.jar}"/>
      <pathelement location="${commons-modeler.jar}"/>
      <pathelement location="${commons-pool.jar}"/>
      <pathelement location="${jaas.jar}"/>
      <pathelement location="${jcert.jar}"/>
      <pathelement location="${jdbc20ext.jar}"/>
      <pathelement location="${jmxri.jar}"/>
      <pathelement location="${jmxtools.jar}"/>
      <pathelement location="${jndi.jar}"/>
      <pathelement location="${jnet.jar}"/>
      <pathelement location="${jsse.jar}"/>
      <pathelement location="${jta.jar}"/>
      <pathelement location="${ldap.jar}"/>
      <pathelement location="${mail.jar}"/>
      <pathelement location="${regexp.jar}"/>
      <pathelement location="${servlet.jar}"/>
      <pathelement location="${tyrex.jar}"/>
      <pathelement location="${xerces.jar}"/>
      <pathelement location="${catalina.build}/server/classes"/>
      <pathelement location="${catalina.build}/tests"/>
    </path>
  
    <!-- =================== BUILD: Set compile flags ======================= -->
    <target name="flags">
  
      <!-- JDK flags -->
      <available property="jdk.1.2.present" classname="java.util.HashMap" />
      <available property="jdk.1.3.present"
       classname="java.lang.reflect.Proxy" />
      <available property="jdk.1.4.present" classname="java.nio.Buffer" />
  
      <!-- Ant flags -->
      <available property="style.available"
       classname="org.apache.tools.ant.taskdefs.optional.TraXLiaison" />
  
      <!-- Class availability flags -->
      <available property="beanutils.present"
       classname="org.apache.commons.beanutils.BeanUtils"
       classpath="${commons-beanutils.jar}"/>
      <available property="collections.present"
       classname="org.apache.commons.collections.FastHashMap"
       classpath="${commons-collections.jar}"/>
      <available property="dbcp.present"
       classname="org.apache.commons.dbcp.ConnectionFactory"
       classpath="${commons-dbcp.jar}"/>
      <available property="digester.present"
       classname="org.apache.commons.digester.Digester"
       classpath="${commons-digester.jar}"/>
      <available property="modeler.present"
       classname="org.apache.commons.modeler.Registry"
       classpath="${commons-modeler.jar}"/>
      <available property="jaas.present"
       classname="javax.security.auth.Subject"
       classpath="${jaas.jar}" />
      <condition property="jaxp.present">
        <and>
          <available classname="javax.xml.parsers.SAXParser"
           classpath="${xerces.jar}" />
          <available classname="org.xml.sax.ContentHandler"
           classpath="${xerces.jar}" />
        </and>
      </condition>
      <condition property="javamail.present">
        <and>
          <available classname="javax.activation.DataSource"
           classpath="${activation.jar}" />
          <available classname="javax.mail.Service"
           classpath="${mail.jar}" />
        </and>
      </condition>
      <available property="jmx.present"
       classname="javax.management.MBeanServer"
       classpath="${jmxri.jar}" />
      <available property="jmxtools.present"
       classname="com.sun.jdmk.Trace"
       classpath="${jmxtools.jar}" />
      <available property="jndi.present"
       classname="javax.naming.Context"
       classpath="${jndi.jar}" />
      <condition property="jsse.present">
        <and>
          <available classname="javax.security.cert.Certificate"
           classpath="${jcert.jar}" />
          <available classname="javax.net.SocketFactory"
           classpath="${jnet.jar}" />
          <available classname="javax.net.ssl.SSLSocket"
           classpath="${jsse.jar}" />
        </and>
      </condition>
      <condition property="jta.present">
        <and>
          <available classname="javax.sql.XADataSource"
           classpath="${jdbc20ext.jar}" />
          <available classname="javax.transaction.UserTransaction"
           classpath="${jta.jar}" />
        </and>
      </condition>
      <available property="junit.present"
       classname="junit.framework.TestCase"
       classpath="${junit.jar}" />
      <available property="ldap.present"
       classname="com.sun.jndi.ldap.LdapClient"
       classpath="${ldap.jar}" />
      <available property="pool.present"
       classname="org.apache.commons.pool.ObjectPool"
       classpath="${commons-pool.jar}"/>
      <available property="regexp.present"
       classname="org.apache.regexp.RE"
       classpath="${regexp.jar}" />
      <available property="servlet.present"
       classname="javax.servlet.Servlet"
       classpath="${servlet.jar}" />
      <available property="tyrex.present"
       classname="tyrex.tm.Tyrex"
       classpath="${tyrex.jar}" />
      <available property="xerces.present"
       classname="org.apache.xerces.parsers.SAXParser"
       classpath="${xerces.jar}" />
  
      <!-- JAR files availability flags -->
      <available property="tomcat-ajp.jar.present" file="${tomcat-ajp.jar}" />
      <available property="dbcp.jar.present" file="${commons-dbcp.jar}" />
      <available property="jaas.jar.present" file="${jaas.jar}" />
      <condition property="javamail.jar.present">
        <and>
          <available file="${activation.jar}" />
          <available file="${mail.jar}" />
        </and>
      </condition>
      <available property="jdbc20ext.jar.present" file="${jdbc20ext.jar}" />
      <available property="jmxri.jar.present" file="${jmxri.jar}" />
      <available property="jmxtools.jar.present" file="${jmxtools.jar}" />
      <available property="jcert.jar.present" file="${jcert.jar}" />
      <available property="jndi.jar.present" file="${jndi.jar}" />
      <available property="jnet.jar.present" file="${jnet.jar}" />
      <available property="jsse.jar.present" file="${jsse.jar}" />
      <available property="jta.jar.present" file="${jta.jar}" />
      <available property="junit.jar.present" file="${junit.jar}" />
      <available property="ldap.jar.present" file="${ldap.jar}" />
      <available property="modeler.jar.present" file="${commons-modeler.jar}" />
      <available property="pool.jar.present" file="${commons-pool.jar}" />
      <available property="regexp.jar.present" file="${regexp.jar}" />
      <available property="servlet.jar.present" file="${servlet.jar}" />
      <available property="tomcat-util.jar.present" file="${tomcat-util.jar}" />
      <available property="tyrex.jar.present" file="${tyrex.jar}" />
      <available property="xerces.jar.present" file="${xerces.jar}" />
  
      <!-- Conditional compilation flags (determined from the flags above) -->
      <condition property="compile.dbcp">
        <or>
          <equals arg1="${full.dist}" arg2="on" />
          <and>
            <equals arg1="${dbcp.present}" arg2="true" />
            <equals arg1="${pool.present}" arg2="true" />
          </and>
        </or>
      </condition>
      <condition property="compile.jaas">
        <or>
          <equals arg1="${full.dist}" arg2="on" />
          <equals arg1="${jaas.present}" arg2="true" />
        </or>
      </condition>
      <condition property="compile.javamail">
        <or>
          <equals arg1="${full.dist}" arg2="on" />
          <equals arg1="${javamail.present}" arg2="true" />
        </or>
      </condition>
      <condition property="compile.jmx">
        <or>
          <equals arg1="${full.dist}" arg2="on" />
          <and>
            <equals arg1="${jmx.present}" arg2="true" />
            <equals arg1="${jmxtools.present}" arg2="true" />
            <equals arg1="${modeler.present}" arg2="true" />
          </and>
        </or>
      </condition>
      <condition property="compile.jndi">
        <or>
          <equals arg1="${full.dist}" arg2="on" />
          <equals arg1="${jndi.present}" arg2="true" />
          <equals arg1="${jdk.1.3.present}" arg2="true" />
        </or>
      </condition>
      <condition property="compile.jsse">
        <or>
          <equals arg1="${full.dist}" arg2="on" />
          <equals arg1="${jsse.present}" arg2="true" />
          <equals arg1="${jdk.1.4.present}" arg2="true" />
        </or>
      </condition>
      <condition property="compile.jta">
        <or>
          <equals arg1="${full.dist}" arg2="on" />
          <equals arg1="${jta.present}" arg2="true" />
        </or>
      </condition>
      <condition property="compile.junit">
        <or>
          <equals arg1="${full.dist}" arg2="on" />
          <equals arg1="${junit.present}" arg2="true" />
        </or>
      </condition>
      <condition property="compile.ldap">
        <or>
          <equals arg1="${full.dist}" arg2="on" />
          <equals arg1="${ldap.present}" arg2="true" />
          <equals arg1="${jdk.1.3.present}" arg2="true" />
        </or>
      </condition>
      <property name="compile.ssi" value="true"/>
      <condition property="compile.tyrex">
        <or>
          <equals arg1="${full.dist}" arg2="on" />
          <equals arg1="${tyrex.present}" arg2="true" />
        </or>
      </condition>
  
      <!-- Conditional copy flags (determined from the flags above) -->
      <condition property="copy.tomcat-ajp.jar">
        <or>
          <equals arg1="${full.dist}" arg2="on" />
          <equals arg1="${tomcat-ajp.jar.present}" arg2="true" />
        </or>
      </condition>
      <condition property="copy.dbcp.jar">
        <or>
          <equals arg1="${full.dist}" arg2="on" />
          <equals arg1="${dbcp.present}" arg2="true" />
        </or>
      </condition>
      <condition property="copy.jaas.jar">
        <or>
          <equals arg1="${full.dist}" arg2="on" />
          <and>
            <equals arg1="${jaas.jar.present}" arg2="true" />
            <not>
              <equals arg1="${jdk.1.4.present}" arg2="true" />
            </not>
          </and>
        </or>
      </condition>
      <condition property="copy.jdbc20ext.jar">
        <or>
          <equals arg1="${full.dist}" arg2="on" />
          <and>
            <equals arg1="${jdbc20ext.jar.present}" arg2="true" />
            <not>
              <equals arg1="${jdk.1.4.present}" arg2="true" />
            </not>
          </and>
        </or>
      </condition>
      <condition property="copy.jndi.jar">
        <or>
          <equals arg1="${full.dist}" arg2="on" />
          <and>
            <equals arg1="${jndi.jar.present}" arg2="true" />
            <not>
              <or>
                <equals arg1="${jdk.1.3.present}" arg2="true" />
                <equals arg1="${jdk.1.4.present}" arg2="true" />
              </or>
            </not>
          </and>
        </or>
      </condition>
      <condition property="copy.javamail.jar">
        <or>
          <equals arg1="${full.dist}" arg2="on" />
          <equals arg1="${javamail.jar.present}" arg2="true" />
        </or>
      </condition>
      <condition property="copy.jmxri.jar">
        <or>
          <equals arg1="${full.dist}" arg2="on" />
          <equals arg1="${jmxri.jar.present}" arg2="true" />
        </or>
      </condition>
      <condition property="copy.jmxtools.jar">
        <or>
          <equals arg1="${full.dist}" arg2="on" />
          <equals arg1="${jmxtools.jar.present}" arg2="true" />
        </or>
      </condition>
      <condition property="copy.jta.jar">
        <or>
          <equals arg1="${full.dist}" arg2="on" />
          <equals arg1="${jta.jar.present}" arg2="true" />
        </or>
      </condition>
      <condition property="copy.ldap.jar">
        <or>
          <equals arg1="${full.dist}" arg2="on" />
          <and>
            <equals arg1="${ldap.jar.present}" arg2="true" />
            <not>
              <or>
                <equals arg1="${jdk.1.3.present}" arg2="true" />
                <equals arg1="${jdk.1.4.present}" arg2="true" />
              </or>
            </not>
          </and>
        </or>
      </condition>
      <condition property="copy.jsse.jar">
        <or>
          <equals arg1="${full.dist}" arg2="on" />
          <and>
            <equals arg1="${jcert.jar.present}" arg2="true" />
            <equals arg1="${jnet.jar.present}" arg2="true" />
            <equals arg1="${jsse.jar.present}" arg2="true" />
            <not>
              <equals arg1="${jdk.1.4.present}" arg2="true" />
            </not>
          </and>
        </or>
      </condition>
      <condition property="copy.modeler.jar">
        <or>
          <equals arg1="${full.dist}" arg2="on" />
          <equals arg1="${modeler.present}" arg2="true" />
        </or>
      </condition>
      <condition property="copy.pool.jar">
        <or>
          <equals arg1="${full.dist}" arg2="on" />
          <equals arg1="${pool.present}" arg2="true" />
        </or>
      </condition>
      <condition property="copy.tyrex.jar">
        <or>
          <equals arg1="${full.dist}" arg2="on" />
          <equals arg1="${tyrex.jar.present}" arg2="true" />
        </or>
      </condition>
      <condition property="copy.xerces.jar">
        <or>
          <equals arg1="${full.dist}" arg2="on" />
          <not>
            <equals arg1="${jdk.1.4.present}" arg2="true" />
          </not>
        </or>
      </condition>
  
    </target>
  
    <!-- =================== BUILD: Set compile flags ======================= -->
    <target name="flags.display" depends="flags" unless="flags.hide">
  
      <echo message="--- Build environment for Catalina ---" />
  
      <echo message="If ${property_name} is displayed, then the property is not set)" />
  
      <echo message="--- Build options ---" />
      <echo message="full.dist=${full.dist}" />
      <echo message="build.sysclasspath=${build.sysclasspath}" />
      <echo message="compile.debug=${compile.debug}" />
      <echo message="compile.deprecation=${compile.deprecation}" />
      <echo message="compile.optimize=${compile.optimize}" />
  
      <echo message="--- Ant Flags ---" />
      <echo message="&lt;style&gt; task available (required)=${style.available}"
/>
  
      <echo message="--- JDK ---" />
      <echo message="jdk.1.2.present=${jdk.1.2.present}" />
      <echo message="jdk.1.3.present=${jdk.1.3.present}" />
      <echo message="jdk.1.4.present=${jdk.1.4.present}" />
  
      <echo message="--- Required Libraries ---" />
      <echo message="beanutils.present=${beanutils.present}" />
      <echo message="collections.present=${collections.present}" />
      <echo message="digester.present=${digester.present}" />
      <echo message="jaxp.present=${jaxp.present}" />
      <echo message="jndi.present=${jndi.present}" />
      <echo message="regexp.present=${regexp.present}" />
      <echo message="servlet.present=${servlet.present}" />
  
      <echo message="--- Optional Libraries ---" />
      <echo message="dbcp.present=${dbcp.present}" />
      <echo message="jaas.present=${jaas.present}" />
      <echo message="javamail.present=${javamail.present}" />
      <echo message="jmx.present=${jmx.present}" />
      <echo message="jmxtools.present=${jmxtools.present}" />
      <echo message="jsse.present=${jsse.present}" />
      <echo message="jta.present=${jta.present}" />
      <echo message="junit.present=${junit.present}" />
      <echo message="ldap.present=${ldap.present}" />
      <echo message="modeler.present=${modeler.present}" />
      <echo message="pool.present=${pool.present}" />
      <echo message="tyrex.present=${tyrex.present}" />
  
      <echo message="--- Required JARs ---" />
      <echo message="jndi.jar.present(except JDK 1.3+)=${jndi.jar.present}" />
      <echo message="regexp.jar.present=${regexp.jar.present}" />
      <echo message="servlet.jar.present=${servlet.jar.present}" />
      <echo message="xerces.jar.present(except JDK 1.4+)=${xerces.jar.present}" />
  
      <echo message="--- Optional JARs ---" />
      <echo message="tomcat-ajp.jar.present=${tomcat-ajp.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}" />
      <echo message="jdbc20ext.jar.present=${jdbc20ext.jar.present}" />
      <echo message="jmxri.jar.present=${jmxri.jar.present}" />
      <echo message="jmxtools.jar.present=${jmxtools.jar.present}" />
      <echo message="jta.jar.present=${jta.jar.present}" />
      <echo message="junit.jar.present=${junit.jar.present}" />
      <echo message="ldap.jar.present=${ldap.jar.present}" />
      <echo message="modeler.jar.present=${modeler.jar.present}" />
      <echo message="pool.jar.present=${pool.jar.present}" />
      <echo message="tomcat-util.jar.present=${tomcat-util.jar.present}" />
      <echo message="tyrex.jar.present=${tyrex.jar.present}" />
  
      <echo message="--- Conditional compilation flags ---" />
      <echo message="compile.dbcp=${compile.dbcp}" />
      <echo message="compile.jaas=${compile.jaas}" />
      <echo message="compile.javamail=${compile.javamail}" />
      <echo message="compile.jmx=${compile.jmx}" />
      <echo message="compile.jndi=${compile.jndi}" />
      <echo message="compile.jsse=${compile.jsse}" />
      <echo message="compile.jta=${compile.jta}" />
      <echo message="compile.junit=${compile.junit}" />
      <echo message="compile.ldap=${compile.ldap}" />
      <echo message="compile.ssi=${compile.ssi}" />
      <echo message="compile.tyrex=${compile.tyrex}" />
  
      <echo message="--- Distribution flags ---" />
      <echo message="copy.tomcat-ajp.jar=${copy.tomcat-ajp.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}" />
      <echo message="copy.javamail.jar=${copy.javamail.jar}" />
      <echo message="copy.jmxri.jar=${copy.jmxri.jar}" />
      <echo message="copy.jmxtools.jar=${copy.jmxtools.jar}" />
      <echo message="copy.jndi.jar=${copy.jndi.jar}" />
      <echo message="copy.jta.jar=${copy.jta.jar}" />
      <echo message="copy.ldap.jar=${copy.ldap.jar}" />
      <echo message="copy.modeler.jar=${copy.modeler.jar}" />
      <echo message="copy.pool.jar=${copy.pool.jar}" />
      <echo message="copy.tyrex.jar=${copy.tyrex.jar}" />
      <echo message="copy.xerces.jar=${copy.xerces.jar}" />
  
    </target>
  
    <!-- =================== BUILD: Create Directories ====================== -->
    <target name="build-prepare">
  
      <mkdir dir="${catalina.build}"/>
      <mkdir dir="${catalina.build}/bin"/>
      <mkdir dir="${catalina.build}/common/classes"/>
      <mkdir dir="${catalina.build}/common/lib"/>
      <mkdir dir="${catalina.build}/conf"/>
      <mkdir dir="${catalina.build}/logs"/>
      <mkdir dir="${catalina.build}/server/classes"/>
      <mkdir dir="${catalina.build}/server/lib"/>
      <mkdir dir="${catalina.build}/shared/classes"/>
      <mkdir dir="${catalina.build}/shared/lib"/>
      <mkdir dir="${catalina.build}/work"/>
      <mkdir dir="${catalina.build}/temp"/>
  
    </target>
  
    <!-- ======================== BUILD: Copy JARs ========================== -->
    <target name="copy-tomcat-ajp.jar" if="copy.tomcat-ajp.jar">
      <copy todir="${catalina.build}/server/lib" file="${tomcat-ajp.jar}"/>
    </target>
    <target name="copy-activation.jar" if="copy.javamail.jar">
      <copy todir="${catalina.build}/common/lib" file="${activation.jar}"/>
      <copy todir="${catalina.build}/common/lib" file="${mail.jar}"/>
    </target>
    <target name="copy-dbcp.jar" if="copy.dbcp.jar">
      <copy todir="${catalina.build}/server/lib" file="${commons-dbcp.jar}"/>
    </target>
    <target name="copy-jaas.jar" if="copy.jaas.jar">
      <copy todir="${catalina.build}/server/lib" file="${jaas.jar}"/>
    </target>
    <target name="copy-jdbc20ext.jar" if="copy.jdbc20ext.jar">
      <copy todir="${catalina.build}/common/lib" file="${jdbc20ext.jar}"/>
    </target>
    <target name="copy-jmxri.jar" if="copy.jmxri.jar">
      <copy todir="${catalina.build}/server/lib" file="${jmxri.jar}"/>
    </target>
    <target name="copy-jmxtools.jar" if="copy.jmxtools.jar">
      <copy todir="${catalina.build}/server/lib" file="${jmxtools.jar}"/>
    </target>
    <target name="copy-jndi.jar" if="copy.jndi.jar">
      <copy todir="${catalina.build}/common/lib" file="${jndi.jar}"/>
    </target>
    <target name="copy-jta.jar" if="copy.jta.jar">
      <copy todir="${catalina.build}/common/lib" file="${jta.jar}"/>
    </target>
    <target name="copy-ldap.jar" if="copy.ldap.jar">
      <!-- Cannot redistribute LDAP
      <copy todir="${catalina.build}/common/lib" file="${ldap.jar}"/>
      -->
    </target>
    <target name="copy-jsse.jar" if="copy.jsse.jar">
      <!-- Cannot redistribute JSSE
      <copy todir="${catalina.build}/common/lib" file="${jcert.jar}"/>
      <copy todir="${catalina.build}/common/lib" file="${jnet.jar}"/>
      <copy todir="${catalina.build}/common/lib" file="${jsse.jar}"/>
      -->
    </target>
    <target name="copy-modeler.jar" if="copy.modeler.jar">
      <copy todir="${catalina.build}/server/lib" file="${commons-modeler.jar}"/>
    </target>
    <target name="copy-pool.jar" if="copy.pool.jar">
      <copy todir="${catalina.build}/server/lib" file="${commons-pool.jar}"/>
    </target>
    <target name="copy-tomcat-util.jar">
      <copy todir="${catalina.build}/server/lib" file="${tomcat-util.jar}"/>
    </target>
    <target name="copy-tyrex.jar" if="copy.tyrex.jar">
      <copy todir="${catalina.build}/common/lib" file="${tyrex.jar}"/>
      <copy todir="${catalina.build}/common/lib" file="../lib/tyrex.license"/>
    </target>
    <target name="copy-xerces.jar" if="copy.xerces.jar">
      <copy todir="${catalina.build}/common/lib" file="${xerces.jar}"/>
    </target>
  
    <!-- =================== BUILD: Copy Static Files ======================= -->
    <target name="build-static" depends="flags,flags.display,build-prepare,copy-activation.jar,copy-tomcat-ajp.jar,copy-dbcp.jar,copy-jaas.jar,copy-jdbc20ext.jar,copy-jmxri.jar,copy-jmxtools.jar,copy-jndi.jar,copy-jsse.jar,copy-jta.jar,copy-ldap.jar,copy-modeler.jar,copy-pool.jar,copy-tomcat-util.jar,copy-tyrex.jar,copy-xerces.jar">
  
      <!-- Executable Commands -->
      <copy todir="${catalina.build}/bin">
        <fileset dir="src/bin" />
      </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/catalina.sh"/>
      <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"/>
  
      <!-- Common Extensions -->
      <copy todir="${catalina.build}/common/lib" file="${servlet.jar}"/>
  
      <!-- Configuration Files -->
      <copy todir="${catalina.build}/conf">
        <fileset dir="src/conf">
          <exclude name="catalina.conf.xml" />
        </fileset>
      </copy>
  
      <!-- Catalina Server Libraries -->
      <copy todir="${catalina.build}/server/lib"
             file="${commons-beanutils.jar}"/>
      <copy todir="${catalina.build}/server/lib"
             file="${commons-collections.jar}"/>
      <copy todir="${catalina.build}/server/lib"
             file="${commons-digester.jar}"/>
      <copy todir="${catalina.build}/server/lib" file="${regexp.jar}"/>
  <!-- Not needed for stand alone use
      <copy todir="${catalina.build}/server/lib" file="${jmxri.jar}"/>
  -->
  
    </target>
  
    <!-- ================= BUILD: Compile Server Components ================= -->
    <target name="build-main" depends="build-static">
  
      <!-- Compile Service API -->
      <javac srcdir="../service/java" destdir="${catalina.build}/server/classes"
             debug="${compile.debug}" deprecation="${compile.deprecation}"
             optimize="${compile.optimize}"
             excludes="**/CVS/**" />
  
      <!-- Compile internal server components -->
      <javac srcdir="src/share" destdir="${catalina.build}/server/classes"
             debug="${compile.debug}" deprecation="${compile.deprecation}"
             optimize="${compile.optimize}"
             excludes="**/CVS/**">
        <classpath refid="catalina.classpath" />
        <exclude name="org/apache/catalina/util/ProcessHelper.java"
         unless="jdk.1.3.present"/>
        <exclude name="org/apache/catalina/servlets/CGIServlet.java"
         unless="jdk.1.3.present"/>
        <exclude name="org/apache/naming/NamingService.java"
         unless="compile.jmx"/>
        <exclude name="org/apache/naming/factory/DbcpDataSourceFactory.java"
         unless="compile.dbcp"/>
        <exclude name="org/apache/naming/factory/TyrexDataSourceFactory.java"
         unless="compile.tyrex"/>
        <exclude name="org/apache/naming/factory/TyrexTransactionFactory.java"
         unless="compile.tyrex"/>
        <exclude name="org/apache/catalina/mbeans/**"
         unless="compile.jmx"/>
        <exclude name="org/apache/catalina/net/SSLServerSocketFactory.java"
         unless="compile.jsse"/>
        <exclude name="org/apache/catalina/realm/JAAS**"
         unless="compile.jaas"/>
        <exclude name="org/apache/catalina/servlets/SsiInvokerServlet.java"
         unless="compile.ssi"/>
        <exclude name="org/apache/catalina/util/ssi/**"
         unless="compile.ssi"/>
        <exclude name="org/apache/catalina/valves/CertificatesValve.java"
         unless="compile.jsse"/>
        <exclude name="org/apache/naming/factory/MailSessionFactory.java"
         unless="compile.javamail"/>
        <exclude name="org/apache/naming/factory/SendMailFactory.java"
         unless="compile.javamail"/>
        <exclude name="org/apache/catalina/startup/EmbeddedManager.java"
         unless="compile.jmx"/>
        <exclude name="org/apache/catalina/startup/CatalinaManager.java"
         unless="compile.jmx"/>
        <exclude name="org/apache/naming/NamingService.java"
         unless="compile.jmx"/>
      </javac>
  
      <!-- Copy static resource files -->
      <copy todir="${catalina.build}/server/classes">
        <fileset dir="src/share">
          <exclude name="**/*.java"/>
        </fileset>
      </copy>
  
    </target>
  
    <!-- ================ BUILD: Create Catalina Javadocs =================== -->
    <target name="javadoc">
      <delete dir="${catalina.build}/javadoc"/>
      <mkdir dir="${catalina.build}/javadoc"/>
      <javadoc packagenames="org.apache.catalina.*,org.apache.naming.*"
        classpathref="catalina.classpath"
        sourcepath="src/share"
        destdir="${catalina.build}/javadoc"
        author="true"
        version="true"
        windowtitle="Catalina Internal API Documentation"
        doctitle="Catalina API"
        bottom="Copyright &#169; 2000-2001 Apache Software Foundation.  All Rights Reserved."
      />
    </target>
  
    <!-- ======================= BUILD: Clean Directory ===================== -->
    <target name="build-clean">
      <delete dir="${catalina.build}"/>
    </target>
  
    <!-- ==================== BUILD: Rebuild Everything ===================== -->
    <target name="all" depends="build-clean,build-main"
     description="Clean, build, and deploy Catalina component"/>
  
    <!-- ================ TEST: Compile Unit Tests ========================== -->
    <target name="build-tests" depends="build-main" if="junit.present">
      <mkdir      dir="${catalina.build}/tests"/>
      <!-- Compile unit test classes -->
      <javac srcdir="src/test" destdir="${catalina.build}/tests"
             deprecation="off" debug="on" optimize="off"
             excludes="**/CVS/**">
        <classpath refid="test.classpath"/>
      </javac>
    </target>
  
    <!-- ==================== TEST: Execute Unit Tests ====================== -->
    <target name="test" if="junit.present"
     description="Run all unit test cases"
     depends="build-tests,test-dir-context,test-util">
    </target>
  
    <target name="test-dir-context" if="junit.present">
  
      <echo message="Running FileDirContext tests"/>
      <java classname="${test.runner}" fork="yes"
          failonerror="${test.failonerror}">
        <sysproperty key="doc.base" value="${test.webapp}"/>
        <arg value="org.apache.naming.resources.FileDirContextTestCase"/>
        <classpath refid="test.classpath"/>
      </java>
  
      <echo message="Running WARDirContext tests"/>
      <jar jarfile="${test.webapp.war}">
        <fileset dir="${test.webapp}"/>
      </jar>
      <java classname="${test.runner}" fork="yes"
          failonerror="${test.failonerror}">
        <sysproperty key="doc.base" value="${test.webapp.war}"/>
        <arg value="org.apache.naming.resources.WARDirContextTestCase"/>
        <classpath refid="test.classpath"/>
      </java>
      <delete file="${test.webapp.war}"/>
  
    </target>
  
    <target name="test-util" if="junit.present">
  
      <echo message="Running CookieTools tests"/>
      <java classname="${test.runner}" fork="yes"
          failonerror="${test.failonerror}">
        <arg value="org.apache.catalina.util.CookieToolsTestCase"/>
        <classpath refid="test.classpath"/>
      </java>
  
      <echo message="Running URL tests"/>
      <java classname="${test.runner}" fork="yes"
          failonerror="${test.failonerror}">
        <arg value="org.apache.catalina.util.URLTestCase"/>
        <classpath refid="test.classpath"/>
      </java>
  
    </target>
  
    <!-- ====================== DEPLOY: Create Directories ================== -->
    <target name="deploy-prepare">
      <mkdir dir="${catalina.deploy}"/>
      <mkdir dir="${catalina.deploy}/bin"/>
      <mkdir dir="${catalina.deploy}/conf"/>
      <mkdir dir="${catalina.deploy}/logs"/>
      <mkdir dir="${catalina.deploy}/common/classes"/>
      <mkdir dir="${catalina.deploy}/common/lib"/>
      <mkdir dir="${catalina.deploy}/server/classes"/>
      <mkdir dir="${catalina.deploy}/server/lib"/>
      <mkdir dir="${catalina.deploy}/work"/>
      <mkdir dir="${catalina.deploy}/temp"/>
    </target>
  
    <!-- ====================== DEPLOY: Copy Static Files =================== -->
    <target name="deploy-static" depends="build-main,deploy-prepare">
  
      <!-- Executable Commands -->
      <copy todir="${catalina.deploy}/bin">
        <fileset dir="${catalina.build}/bin" />
      </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/catalina.sh"/>
      <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"/>
  
      <!-- Common Extensions -->
      <copy todir="${catalina.deploy}/common/lib">
        <fileset dir="${catalina.build}/common/lib" />
      </copy>
  
      <!-- Configuration Files -->
      <copy todir="${catalina.deploy}/conf">
        <fileset dir="${catalina.build}/conf" />
      </copy>
  
      <!-- Server Components -->
      <copy todir="${catalina.deploy}/server/lib">
        <fileset dir="${catalina.build}/server/lib" />
      </copy>
  
      <!-- Shared Extensions -->
      <copy todir="${catalina.deploy}/shared/lib">
        <fileset dir="${catalina.build}/shared/lib" />
      </copy>
  
    </target>
  
    <!-- ====================== DEPLOY: Create Catalina JARs ================ -->
    <target name="deploy" depends="deploy-static,build-main"
     description="Build and deploy Catalina component">
  
      <!-- Catalina Bootstrap JAR File -->
      <jar jarfile="${catalina.deploy}/bin/bootstrap.jar"
           manifest="etc/bootstrap.MF">
        <fileset dir="${catalina.build}/server/classes">
          <include name="org/apache/service/Service.class" />
          <include name="org/apache/service/ServiceController.class" />
          <include name="org/apache/catalina/startup/Bootstrap.class" />
          <include name="org/apache/catalina/startup/BootstrapService.class" />
          <include name="org/apache/catalina/startup/ClassLoaderFactory.class" />
          <include name="org/apache/catalina/startup/Tool.class" />
          <include name="org/apache/catalina/loader/StandardClassLoader*.class" />
          <include name="org/apache/catalina/loader/Extension.class" />
          <include name="org/apache/catalina/loader/Reloader.class" />
          <include name="org/apache/catalina/startup/SecurityManagerDebug.class" />
          <include name="org/apache/naming/JndiPermission.class" />
        </fileset>
      </jar>
  
      <!-- Catalina Main JAR File -->
      <jar jarfile="${catalina.deploy}/server/lib/catalina.jar">
        <fileset dir="${catalina.build}/server/classes">
          <exclude name="org/apache/naming/**" />
          <exclude name="**/connector/warp/**" />
          <exclude name="org/apache/catalina/startup/Bootstrap.class" />
          <exclude name="org/apache/catalina/startup/BootstrapService.class" />
          <exclude name="org/apache/catalina/startup/ClassLoaderFactory.class" />
          <exclude name="org/apache/catalina/startup/Tool.class" />
          <exclude name="org/apache/catalina/loader/StandardClassLoader*.class" />
          <exclude name="org/apache/catalina/loader/Extension.class" />
          <exclude name="org/apache/catalina/loader/Reloader.class" />
          <exclude name="org/apache/catalina/startup/SecurityManagerDebug.class" />
          <exclude name="org/apache/catalina/servlets/**" />
          <exclude name="org/apache/catalina/util/ssi/**" />
        </fileset>
      </jar>
  
      <!-- Naming - Common JAR File -->
      <jar jarfile="${catalina.deploy}/common/lib/naming-common.jar">
        <fileset dir="${catalina.build}/server/classes">
          <include name="org/apache/naming/*" />
          <include name="org/apache/naming/factory/Constants.class" />
          <include name="org/apache/naming/factory/ResourceLinkFactory.class" />
          <include name="org/apache/naming/java/*" />
          <exclude name="org/apache/naming/JndiPermission.class" />
        </fileset>
      </jar>
  
      <!-- Naming - Factory JAR File -->
      <jar jarfile="${catalina.deploy}/shared/lib/naming-factory.jar">
        <fileset dir="${catalina.build}/server/classes">
          <include name="org/apache/naming/factory/**" />
          <exclude name="org/apache/naming/factory/Constants.class" />
          <exclude name="org/apache/naming/factory/ResourceLinkFactory.class" />
        </fileset>
      </jar>
  
      <!-- Naming - Resources JAR File -->
      <jar jarfile="${catalina.deploy}/common/lib/naming-resources.jar">
        <fileset dir="${catalina.build}/server/classes">
          <include name="org/apache/naming/resources/*" />
        </fileset>
      </jar>
  
      <!-- Servlets - Common Files -->
      <jar  jarfile="${catalina.deploy}/server/lib/servlets-common.jar">
        <fileset dir="${catalina.build}/server/classes">
          <include name="org/apache/catalina/servlets/Constants.class" />
          <include name="org/apache/catalina/servlets/*.properties" />
        </fileset>
      </jar>
  
      <!-- Servlets - CGI Servlet -->
      <jar jarfile="${catalina.deploy}/server/lib/servlets-cgi.renametojar">
        <fileset dir="${catalina.build}/server/classes">
          <include name="org/apache/catalina/servlets/CGI*" />
        </fileset>
      </jar>
  
      <!-- Servlets - Default File-Serving Servlet -->
      <jar jarfile="${catalina.deploy}/server/lib/servlets-default.jar">
        <fileset dir="${catalina.build}/server/classes">
          <include name="org/apache/catalina/servlets/Default*" />
        </fileset>
      </jar>
  
      <!-- Servlets - Invoker Servlet -->
      <jar jarfile="${catalina.deploy}/server/lib/servlets-invoker.jar">
        <fileset dir="${catalina.build}/server/classes">
          <include name="org/apache/catalina/servlets/Invoker*" />
        </fileset>
      </jar>
  
      <!-- Servlets - Manager Servlet -->
      <jar jarfile="${catalina.deploy}/server/lib/servlets-manager.jar">
        <fileset dir="${catalina.build}/server/classes">
          <include name="org/apache/catalina/servlets/*Manager*" />
        </fileset>
      </jar>
  
      <!-- Servlets - Snoop Servlet -->
      <jar jarfile="${catalina.deploy}/server/lib/servlets-snoop.jar">
        <fileset dir="${catalina.build}/server/classes">
          <include name="org/apache/catalina/servlets/Snoop*" />
        </fileset>
      </jar>
  
      <!-- Servlets - SSI Servlet -->
      <jar jarfile="${catalina.deploy}/server/lib/servlets-ssi.renametojar">
        <fileset dir="${catalina.build}/server/classes">
          <include name="org/apache/catalina/servlets/Ssi*" />
          <include name="org/apache/catalina/util/ssi/**" />
        </fileset>
      </jar>
  
      <!-- Servlets - Webdav Servlet -->
      <jar jarfile="${catalina.deploy}/server/lib/servlets-webdav.jar">
        <fileset dir="${catalina.build}/server/classes">
          <include name="org/apache/catalina/servlets/Webdav*" />
        </fileset>
      </jar>
  
      <!-- WARP Connector JAR File -->
      <jar  jarfile="${catalina.deploy}/server/lib/warp.jar"
            basedir="${catalina.build}/server/classes"
            includes="**/connector/warp/**" />
  
    </target>
  
    <!-- ================ DIST: Create Distribution ========================= -->
    <target name="dist" depends="build-main"
     description="Create binary distribution">
  
      <!-- Executable Commands -->
      <mkdir dir="${catalina.dist}/bin"/>
      <copy todir="${catalina.dist}/bin">
        <fileset dir="${catalina.build}/bin" />
      </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/catalina.sh"/>
      <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"/>
  
      <!-- Common Extensions -->
      <mkdir dir="${catalina.dist}/common/classes"/>
      <copy todir="${catalina.dist}/common/classes">
        <fileset dir="${catalina.build}/common/classes" />
      </copy>
      <mkdir dir="${catalina.dist}/common/lib"/>
      <copy todir="${catalina.dist}/common/lib">
        <fileset dir="${catalina.build}/common/lib" />
      </copy>
  
      <!-- Configuration Files -->
      <mkdir dir="${catalina.dist}/conf"/>
      <copy todir="${catalina.dist}/conf">
        <fileset dir="${catalina.build}/conf" />
      </copy>
  
      <!-- Server Components -->
      <mkdir dir="${catalina.dist}/server/classes"/>
      <copy todir="${catalina.dist}/server/classes">
        <fileset dir="${catalina.build}/server/classes" />
      </copy>
      <mkdir dir="${catalina.dist}/server/lib"/>
      <copy todir="${catalina.dist}/server/lib">
        <fileset dir="${catalina.build}/server/lib" />
      </copy>
  
      <!-- Shared Extensions -->
      <mkdir dir="${catalina.dist}/shared/classes"/>
      <copy todir="${catalina.dist}/shared/classes">
        <fileset dir="${catalina.build}/shared/classes" />
      </copy>
      <mkdir dir="${catalina.dist}/shared/lib"/>
      <copy todir="${catalina.dist}/shared/lib">
        <fileset dir="${catalina.build}/shared/lib" />
      </copy>
  
    </target>
  
    <!-- ======================== DIST: Clean Directory ===================== -->
    <target name="dist-clean">
      <delete dir="${catalina.dist}"/>
    </target>
  
    <!-- ====================== Convenient Synonyms ========================= -->
    <target name="clean" depends="build-clean, dist-clean"
     description="Clean build and dist directories"/>
  
  </project>
  
  Revision  Changes    Path
  1.54      +4 -0      jakarta-tomcat-4.0/build.xml
  
  Index: build.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-4.0/build.xml,v
  retrieving revision 1.53
  retrieving revision 1.54
  diff -u -r1.53 -r1.54
  --- build.xml	2001/12/19 17:02:26	1.53
  +++ build.xml	2001/12/26 01:21:51	1.54
  @@ -117,6 +117,7 @@
       <mkdir dir="${tomcat.dist}/shared/lib"/>
       <mkdir dir="${tomcat.dist}/webapps"/>
       <mkdir dir="${tomcat.dist}/work"/>
  +    <mkdir dir="${tomcat.dist}/temp"/>
     </target>
   
   
  @@ -254,6 +255,8 @@
          includes="webapps/**" />
         <zipfileset dir="${tomcat.dist}" prefix="${final.name}" 
          includes="work/**" />
  +      <zipfileset dir="${tomcat.dist}" prefix="${final.name}"
  +       includes="temp/**" />
         <zipfileset dir="${tomcat.dist}" prefix="${final.name}" 
          includes="LICENSE" />
         <zipfileset dir="${tomcat.dist}" prefix="${final.name}" 
  @@ -289,6 +292,7 @@
           <include name="shared/**" />
           <include name="webapps/**" />
           <include name="work/**" />
  +        <include name="temp/**" />
           <include name="LICENSE" />
           <include name="README.txt" />
           <include name="RELEASE-NOTES-*" />
  
  
  

--
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