You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cactus-dev@jakarta.apache.org by vm...@apache.org on 2002/03/10 15:32:48 UTC

cvs commit: jakarta-cactus LICENSE.cactus LICENSE.httpclient LICENSE.httpunit LICENSE.log4j build-admin.xml build.properties.sample build.xml .cvsignore LICENSE

vmassol     02/03/10 06:32:48

  Modified:    .        .cvsignore
  Added:       .        LICENSE.cactus LICENSE.httpclient LICENSE.httpunit
                        LICENSE.log4j build-admin.xml
                        build.properties.sample build.xml
  Removed:     .        LICENSE
  Log:
  second part of build process refactoring
  
  Revision  Changes    Path
  1.4       +15 -1     jakarta-cactus/.cvsignore
  
  Index: .cvsignore
  ===================================================================
  RCS file: /home/cvs/jakarta-cactus/.cvsignore,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- .cvsignore	18 Sep 2001 17:35:56 -0000	1.3
  +++ .cvsignore	10 Mar 2002 14:32:48 -0000	1.4
  @@ -1,3 +1,17 @@
  -build/build.properties
  +anttasks/build.properties
  +anttasks/dist
  +anttasks/target
  +framework/build.properties
  +framework/dist
  +framework/target
  +documentation/build.properties
  +documentation/dist
  +documentation/target
  +sample-servlet/build.properties
  +sample-servlet/dist
  +sample-servlet/target
  +build.properties
   dist
   target
  +release
  +
  
  
  
  1.1                  jakarta-cactus/LICENSE.cactus
  
  Index: LICENSE.cactus
  ===================================================================
  /*
   * ====================================================================
   *
   * The Apache Software License, Version 1.1
   *
   * Copyright (c) 2001-2002 The Apache Software Foundation.  All rights
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *    notice, this list of conditions and the following disclaimer.
   *
   * 2. Redistributions in binary form must reproduce the above copyright
   *    notice, this list of conditions and the following disclaimer in
   *    the documentation and/or other materials provided with the
   *    distribution.
   *
   * 3. The end-user documentation included with the redistribution, if
   *    any, must include the following acknowlegement:
   *       "This product includes software developed by the
   *        Apache Software Foundation (http://www.apache.org/)."
   *    Alternately, this acknowlegement may appear in the software itself,
   *    if and wherever such third-party acknowlegements normally appear.
   *
   * 4. The names "The Jakarta Project", "Cactus" and "Apache Software
   *    Foundation" must not be used to endorse or promote products
   *    derived from this software without prior written permission. For
   *    written permission, please contact apache@apache.org.
   *
   * 5. Products derived from this software may not be called "Apache"
   *    nor may "Apache" appear in their names without prior written
   *    permission of the Apache Group.
   *
   * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
   * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
   * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
   * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
   * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
   * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
   * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
   * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
   * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   * SUCH DAMAGE.
   * ====================================================================
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation.  For more
   * information on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   *
   */
  
  
  1.1                  jakarta-cactus/LICENSE.httpclient
  
  Index: LICENSE.httpclient
  ===================================================================
  /*
   * $Header: /home/cvs/jakarta-cactus/LICENSE.httpclient,v 1.1 2002/03/10 14:32:48 vmassol Exp $
   * $Revision: 1.1 $
   * $Date: 2002/03/10 14:32:48 $
   *
   * ====================================================================
   * 
   * The Apache Software License, Version 1.1
   *
   * Copyright (c) 1999-2001 The Apache Software Foundation.  All rights 
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *    notice, this list of conditions and the following disclaimer. 
   *
   * 2. Redistributions in binary form must reproduce the above copyright
   *    notice, this list of conditions and the following disclaimer in
   *    the documentation and/or other materials provided with the
   *    distribution.
   *
   * 3. The end-user documentation included with the redistribution, if
   *    any, must include the following acknowlegement:  
   *       "This product includes software developed by the 
   *        Apache Software Foundation (http://www.apache.org/)."
   *    Alternately, this acknowlegement may appear in the software itself,
   *    if and wherever such third-party acknowlegements normally appear.
   *
   * 4. The names "The Jakarta Project", "Commons", and "Apache Software
   *    Foundation" must not be used to endorse or promote products derived
   *    from this software without prior written permission. For written 
   *    permission, please contact apache@apache.org.
   *
   * 5. Products derived from this software may not be called "Apache"
   *    nor may "Apache" appear in their names without prior written
   *    permission of the Apache Group.
   *
   * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
   * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
   * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
   * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
   * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
   * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
   * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
   * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
   * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   * SUCH DAMAGE.
   * ====================================================================
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation.  For more
   * information on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   *
   */ 
  
  
  
  
  
  
  
  
  1.1                  jakarta-cactus/LICENSE.httpunit
  
  Index: LICENSE.httpunit
  ===================================================================
  Permission is hereby granted, free of charge, to any person obtaining a copy of
  this software and associated documentation files (the "Software"), to deal in
  the Software without restriction, including without limitation the rights to
  use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
  of the Software, and to permit persons to whom the Software is furnished to do
  so, subject to the following conditions:
  
  The above copyright notice and this permission notice shall be included in all
  copies or substantial portions of the Software.
  
  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
  SOFTWARE.
  
  
  
  1.1                  jakarta-cactus/LICENSE.log4j
  
  Index: LICENSE.log4j
  ===================================================================
  /*
   * ============================================================================
   *                   The Apache Software License, Version 1.1
   * ============================================================================
   * 
   *    Copyright (C) 1999 The Apache Software Foundation. All rights reserved.
   * 
   * Redistribution and use in source and binary forms, with or without modifica-
   * tion, are permitted provided that the following conditions are met:
   * 
   * 1. Redistributions of  source code must  retain the above copyright  notice,
   *    this list of conditions and the following disclaimer.
   * 
   * 2. Redistributions in binary form must reproduce the above copyright notice,
   *    this list of conditions and the following disclaimer in the documentation
   *    and/or other materials provided with the distribution.
   * 
   * 3. The end-user documentation included with the redistribution, if any, must
   *    include  the following  acknowledgment:  "This product includes  software
   *    developed  by the  Apache Software Foundation  (http://www.apache.org/)."
   *    Alternately, this  acknowledgment may  appear in the software itself,  if
   *    and wherever such third-party acknowledgments normally appear.
   * 
   * 4. The names "log4j" and  "Apache Software Foundation"  must not be used to
   *    endorse  or promote  products derived  from this  software without  prior
   *    written permission. For written permission, please contact
   *    apache@apache.org.
   * 
   * 5. Products  derived from this software may not  be called "Apache", nor may
   *    "Apache" appear  in their name,  without prior written permission  of the
   *    Apache Software Foundation.
   * 
   * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
   * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
   * FITNESS  FOR A PARTICULAR  PURPOSE ARE  DISCLAIMED.  IN NO  EVENT SHALL  THE
   * APACHE SOFTWARE  FOUNDATION  OR ITS CONTRIBUTORS  BE LIABLE FOR  ANY DIRECT,
   * INDIRECT, INCIDENTAL, SPECIAL,  EXEMPLARY, OR CONSEQUENTIAL  DAMAGES (INCLU-
   * DING, BUT NOT LIMITED TO, PROCUREMENT  OF SUBSTITUTE GOODS OR SERVICES; LOSS
   * OF USE, DATA, OR  PROFITS; OR BUSINESS  INTERRUPTION)  HOWEVER CAUSED AND ON
   * ANY  THEORY OF LIABILITY,  WHETHER  IN CONTRACT,  STRICT LIABILITY,  OR TORT
   * (INCLUDING  NEGLIGENCE OR  OTHERWISE) ARISING IN  ANY WAY OUT OF THE  USE OF
   * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
   * 
   * This software  consists of voluntary contributions made  by many individuals
   * on  behalf of the Apache Software  Foundation.  For more  information on the 
   * Apache Software Foundation, please see <http://www.apache.org/>.
   *
   */
  
  
  
  1.1                  jakarta-cactus/build-admin.xml
  
  Index: build-admin.xml
  ===================================================================
  <?xml version="1.0"?>
  
  <!--
    =============================================================================
      Build file for Cactus related administrative tasks (build and upload the
      Cactus web site, upload a distribution, etc).
  
      The following properties need to be set in either a ./build.properties or
      a ${user.home}/build.properties one or in a calling Ant script :
  
          jakarta.username       [OPTIONAL] Needed for the deploy.website target.
                                 It is the username to use when connecting to
                                 jakarta.apache.org.
  
      This script should be started with the following command line :
  
          ant <target>
  
      Run "ant -projecthelp" to get a list of available targets. The default
      target is "dist"
    =============================================================================
  -->
  <project name="Cactus Administration" default="website" basedir=".">
  
      <!-- Give user a chance to override without editing this file
           (and without typing -D each time it compiles it) -->
      <property file="build.properties" />
      <property file="${user.home}/build.properties" />
  
      <!-- Global project properties -->
      <property name="project.name.text" value="Cactus Administration"/>
  
      <!-- Prefix to add to all distributable files -->
      <property name="project.prefix" value="jakarta-"/>
  
      <property name="year" value="2000-2002"/>
  
      <!--
         ========================================================================
           Set the properties related to the target area
         ========================================================================
      -->
      <!-- Distribution directory, i.e. where the expanded distibutable files
           are located -->
      <property name="dist.dir" value="dist"/>
  
      <!-- Release directory, i.e. where the zipped distribution is located -->
      <property name="release.dir" value="release"/>
  
      <!--
         ========================================================================
           Initialize the build. Must be called by all targets
         ========================================================================
      -->
      <target name="init">
  
          <tstamp/>
  
          <echo message="----- ${project.name.text} -----"/>
          <echo message=""/>
          <echo message="java.class.path = ${java.class.path}"/>
          <echo message=""/>
  
      </target>
  
      <!--
         ========================================================================
           Deploy the web site to the Jakarta server, using the 'scp'
           and 'ssh' commands.
  
           Note 1 : This target does not deploy the javadoc
           Note 2 : The property "jakarta.username" need to be passed
           to Ant when calling this target.
         ========================================================================
      -->
      <target name="deploy.website" depends="clean" if="jakarta.username"
          description="Deploy the Cactus web site">
  
          <mkdir dir="${release.dir}"/>
  
          <!-- Generate the website first -->
          <ant target="dist.documentation" inheritAll="false"/>
  
          <!-- Zip it up -->
          <property name="cactus.website.name"
              value="${project.prefix}cactus-website-${DSTAMP}"/>
  
          <tar tarfile="${release.dir}/${cactus.website.name}.tar">
              <tarfileset dir="${dist.dir}/doc">
                  <exclude name="api/**"/>
              </tarfileset>
          </tar>
          <gzip zipfile="${release.dir}/${cactus.website.name}.tar.gz"
              src="${release.dir}/${cactus.website.name}.tar"/>
          <delete file="${release.dir}/${cactus.website.name}.tar"/>
  
          <property name="cactus.homepage"
              value="/www/jakarta.apache.org/cactus"/>
  
          <exec dir="." executable="scp">
              <arg value="${release.dir}/${cactus.website.name}.tar.gz"/>
              <arg value="${jakarta.username}@jakarta.apache.org:${cactus.homepage}"/>
          </exec>
  
          <exec dir="." executable="ssh">
              <arg line="-l ${jakarta.username} jakarta.apache.org 'cd ${cactus.homepage};gunzip ${cactus.website.name}.tar.gz;tar xvf ${cactus.website.name}.tar;rm ${cactus.website.name}.tar'"/>
          </exec>
  
      </target>
  
     <!--
         ========================================================================
           Clean generated files (including distributables)
         ========================================================================
      -->
      <target name="clean" depends="init" description="Clean all generated files">
  
          <delete dir="${dist.dir}"/>
          <delete dir="${release.dir}"/>
  
      </target>
  
  </project>
  
  
  
  1.1                  jakarta-cactus/build.properties.sample
  
  Index: build.properties.sample
  ===================================================================
  # -----------------------------------------------------------------------------
  # build.properties.sample
  #
  # This is an example "build.properties" file, used to customize building the
  # full Cactus project for your local environment.  Make any changes you need,
  # and rename this file to "build.properties" in the same directory that
  # contains the "build.xml" file.
  #
  # $Id: build.properties.sample,v 1.1 2002/03/10 14:32:48 vmassol Exp $
  # -----------------------------------------------------------------------------
  
  # WARNING:  The relative paths below are relative to the directory where the
  # build.xml file is located.
  
  # -----------------------------------------------------------------------------
  # Mandatory properties
  # -----------------------------------------------------------------------------
  
  # The location of the J2EE API jar. Depending on the version (1.2 or 1.3) of
  # it, the corresponding Cactus Framework will be built. For example if you use
  # J2EE 1.3 jar, then the Cactus jar will contain the Filter Redirector which is
  # only available for Servlet 2.3 (part of J2EE 1.3).
  
  j2ee.jar = ../jakarta-servletapi-4/dist/lib/servlet.jar
  #j2ee.jar = ../jakarta-servletapi/dist/lib/servlet.jar
  
  # The location of the log4j jar
  log4j.jar = ../jakarta-log4j/dist/lib/log4j-1.2alpha5.jar
  
  # The location of the Commons Httpclient jar
  commons.httpclient.jar = ../jakarta-commons/httpclient/dist/commons-httpclient.jar
  
  # The location of the Httpunit jar
  httpunit.jar = ../httpunit/lib/httpunit.jar
  
  # The location of the AspectJ runtime jar
  aspectjrt.jar = ../aspectj/lib/aspectjrt.jar
  
  # The location of the Junit jar
  junit.jar = ../junit/junit3.7/junit.jar
  
  # -----------------------------------------------------------------------------
  # Optional properties
  # -----------------------------------------------------------------------------
  
  # The port to use for starting the servers during unit testing. If not
  # sepcified, it defaults to port 8080.
  #test.port = 8081
  
  # Servlet engine locations for the tests
  
  # Note: If you don't want to run the test on a given servlet engine, just
  #       comment it's home property. For example, if you don't want to run the
  #       tests on the Resin 1.2, comment the "resin.home.12" property.
  
  #resin.home.12 = f:/applis/resin-1.2.8
  #tomcat.home.32 = c:/Apps/jakarta-tomcat-3.2.4
  #weblogic.home.51 = e:/weblogic
  #orion.home.15 = f:/applis/orion-1.5.2
  #resin.home.20 = f:/applis/resin-2.0.s010820
  #tomcat.home.40 = f:/applis/jakarta-tomcat-4.0-b7
  #resin.home.13 = f:/applis/resin-1.3.s010125
  #tomcat.home.33 = f:/applis/jakarta-tomcat-3.3.1-dev
  #enhydra.home.31 = xxx
  
  # Note: weblogic.home.61 is the location of BEA Home and NOT the location of
  # wlserver6.1, inside the bea home directory.
  #weblogic.home.61 = c:/bea
  
  # Note: There seems to be a bug in Orion 1.4 preventing it to run correctly
  #       the testSendUserData() test. It runs fine in Orion 1.5 though.
  #orion.home.14 = f:/applis/orion-1.4.5
  
  # -----------------------------------------------------------------------------
  # Optional properties used by the build-admin.xml Ant build script only
  # -----------------------------------------------------------------------------
  
  # Username to use when connection to jakarta.apache.org
  jakarta.username=vmassol
  
  
  1.1                  jakarta-cactus/build.xml
  
  Index: build.xml
  ===================================================================
  <?xml version="1.0"?>
  
  <!--
    =============================================================================
      Master build fie for building all Cactus components (the Ant tasks,
      the framework itself, the documentation, the samples).
  
      The following properties need to be set in either a ./build.properties or
      a ${user.home}/build.properties one or in a calling Ant script :
  
          j2ee.jar               [REQUIRED] The location of the J2EE API jar.
                                 Depending on the version (1.2 or 1.3) of it, the
                                 corresponding Cactus Framework will be built. For
                                 example if you use J2EE 1.3 jar, then the Cactus
                                 jar will contain the Filter Redirector which is
                                 only available for Servlet 2.3 (part of J2EE
                                 1.3).
  
          log4j.jar              [REQUIRED] The location of the Log4j jar.
  
          commons.httpclient.jar [REQUIRED] The location of the Commons
                                 Httpclient jar.
  
          httpunit.jar           [REQUIRED] The location of the HttpUnit jar.
  
          aspectjrt.jar          [REQUIRED] The location of the AspectJ runtime
                                 jar.
  
          junit.jar              [REQUIRED] The location of the JUnit jar
  
          test.port              [OPTIONAL] The port that should be used for
                                 starting the servers during testing. This
                                 should be used not to interfere with other
                                 running servers. The default is 8080. This
                                 property is used when running the test target
  
      Additionally and depending on the servlet engines whith which you wish to
      run your tests, you'll need to set the following kind of properties
      (see build.properties.sample) :
  
          <server name>.home.<version>
  
      Example: For Resin 2.0, you'll need to have a "resin.home.20" property
      defined and pointing to the location where Resin 2.0 is installed.
  
      This script should be started with the following command line :
  
          ant <target>
  
      Run "ant -projecthelp" to get a list of available targets. The default
      target is "dist"
    =============================================================================
  -->
  <project name="Master Cactus Build" default="dist" basedir=".">
  
      <!-- Give user a chance to override without editing this file
           (and without typing -D each time it compiles it) -->
      <property file="build.properties" />
      <property file="${user.home}/build.properties" />
  
      <!-- Global project properties -->
      <property name="project.name.text" value="Cactus"/>
      <property name="project.name.file" value="cactus"/>
      <property name="project.version" value="1.3dev"/>
  
      <!-- Prefix to add to all distributable files -->
      <property name="project.prefix" value="jakarta-"/>
  
      <property name="year" value="2000-2002"/>
      <property name="debug" value="on"/>
      <property name="optimize" value="off"/>
      <property name="deprecation" value="off"/>
  
      <!--
         ========================================================================
           Set the properties related to the source tree
         ========================================================================
      -->
      <!-- Source locations for the build -->
      <property name="anttasks.dir" value="anttasks"/>
      <property name="framework.dir" value="framework"/>
      <property name="documentation.dir" value="documentation"/>
      <property name="sample-servlet.dir" value="sample-servlet"/>
  
      <!--
         ========================================================================
           Set the properties related to the target area
         ========================================================================
      -->
      <!-- Destination locations for the build -->
      <property name="target.dir" value="target"/>
      <property name="target.lib.dir" value="${target.dir}/lib"/>
  
      <!-- Distribution directory, i.e. where the expanded distibutable files
           are located -->
      <property name="dist.dir" value="dist"/>
      <property name="dist.lib.dir" value="${dist.dir}/lib"/>
      <property name="dist.doc.dir" value="${dist.dir}/doc"/>
      <property name="dist.doc.api.dir" value="${dist.doc.dir}/api"/>
      <property name="dist.web.dir" value="${dist.dir}/web"/>
  
      <!-- Release directory, i.e. where the zipped distribution is located -->
      <property name="release.dir" value="release"/>
  
      <!-- Name of Cactus distributables needed by Cactus subprojects
           themselves -->
  
      <property name="anttasks.jar.name" value="cactus-ant"/>
      <property name="anttasks.jar"
          value="${anttasks.dir}/${dist.lib.dir}/${anttasks.jar.name}.jar"/>
  
      <property name="framework.jar.name" value="cactus"/>
      <property name="framework.jar"
          value="${framework.dir}/${dist.lib.dir}/${framework.jar.name}.jar"/>
  
      <!--
         ========================================================================
           Display configurable properties values
         ========================================================================
      -->
      <target name="display.properties">
  
          <echo message="----- ${project.name.text} ${project.version} -----"/>
          <echo message=""/>
          <echo message="java.class.path = ${java.class.path}"/>
          <echo message=""/>
          <echo message="java.home = ${java.home}"/>
          <echo message="user.home = ${user.home}"/>
          <echo message="ant.home = ${ant.home}"/>
          <echo message=""/>
          <echo message="j2ee.jar = ${j2ee.jar}"/>
          <echo message="commons.httpclient.jar = ${commons.httpclient.jar}"/>
          <echo message="httpunit.jar = ${httpunit.jar}"/>
          <echo message="junit.jar = ${junit.jar}"/>
          <echo message="aspecjrt.jar = ${aspectjrt.jar}"/>
          <echo message="log4j.jar = ${log4j.jar}"/>
          <echo message=""/>
  
      </target>
  
      <!--
         ========================================================================
           Verify that all mandatory properties have been set
         ========================================================================
      -->
      <target name="check.properties" depends="display.properties">
  
          <condition property="properties.ok">
              <and>
                  <available file="${j2ee.jar}"/>
                  <available file="${log4j.jar}"/>
                  <available file="${commons.httpclient.jar}"/>
                  <available file="${httpunit.jar}"/>
                  <available file="${junit.jar}"/>
                  <available file="${aspectjrt.jar}"/>
             </and>
          </condition>
  
          <fail message="Missing property or property pointing to an invalid file (check your build.properties file)"
              unless="properties.ok"/>
  
      </target>
  
      <!--
          ========================================================================
            Find out the J2EE API version
          ========================================================================
       -->
       <target name="check.j2ee.version">
  
           <condition property="j2ee.api" value="13">
               <available classname="javax.servlet.Filter"
                   classpath="${j2ee.jar}"/>
           </condition>
  
           <condition property="j2ee.api" value="12">
               <available classname="javax.servlet.Servlet"
                   classpath="${j2ee.jar}"/>
           </condition>
  
           <fail message="Unsupported J2EE version" unless="j2ee.api"/>
  
           <echo message="j2ee.api = ${j2ee.api}"/>
  
       </target>
  
      <!--
         ========================================================================
           Initialize the build. Must be called by all targets
         ========================================================================
      -->
      <target name="init" depends="check.properties,check.j2ee.version">
  
          <tstamp/>
  
      </target>
  
      <!--
          ========================================================================
            Generate the distributable files
          ========================================================================
      -->
  
      <!-- Generate Cactus Ant tasks deliverables -->
      <target name="dist.anttasks" depends="clean.anttasks">
  
          <ant target="dist" antfile="${anttasks.dir}/build.xml"
              inheritAll="false">
  
              <property file="build.properties" />
              <property file="${user.home}/build.properties" />
  
              <property name="base.dir" value="${anttasks.dir}"/>
              <property name="project.version" value="${project.version}"/>
              <property name="year" value="${year}"/>
              <property name="debug" value="${debug}"/>
              <property name="optimize" value="${optimize}"/>
              <property name="deprecation" value="${deprecation}"/>
              <property name="dist.dir" value="${anttasks.dir}/${dist.dir}"/>
              <property name="dist.lib.dir"
                  value="${anttasks.dir}/${dist.lib.dir}"/>
              <property name="dist.doc.dir"
                  value="${anttasks.dir}/${dist.doc.dir}"/>
              <property name="dist.doc.api.dir"
                  value="${anttasks.dir}/${dist.doc.api.dir}"/>
              <property name="anttasks.jar.name" value="${anttasks.jar.name}"/>
          </ant>
  
          <copy todir="${dist.lib.dir}">
              <fileset dir="${anttasks.dir}/${dist.lib.dir}"/>
          </copy>
  
          <!-- Copy javadoc in correct directory -->
          <copy todir="${dist.doc.api.dir}/anttasks">
              <fileset dir="${anttasks.dir}/${dist.doc.api.dir}"/>
          </copy>
  
      </target>
  
      <!-- Generate Cactus Ant tasks deliverables -->
      <target name="dist.framework" depends="clean.framework">
  
          <ant target="dist" antfile="${framework.dir}/build.xml"
              inheritAll="false">
  
              <property file="build.properties" />
              <property file="${user.home}/build.properties" />
  
              <property name="base.dir" value="${framework.dir}"/>
              <property name="project.version" value="${project.version}"/>
              <property name="year" value="${year}"/>
              <property name="debug" value="${debug}"/>
              <property name="optimize" value="${optimize}"/>
              <property name="deprecation" value="${deprecation}"/>
              <property name="dist.dir" value="${framework.dir}/${dist.dir}"/>
              <property name="dist.lib.dir"
                  value="${framework.dir}/${dist.lib.dir}"/>
              <property name="dist.doc.dir"
                  value="${framework.dir}/${dist.doc.dir}"/>
              <property name="dist.doc.api.dir"
                  value="${framework.dir}/${dist.doc.api.dir}"/>
              <property name="dist.web.dir"
                  value="${framework.dir}/${dist.web.dir}"/>
              <property name="framework.jar.name" value="${framework.jar.name}"/>
          </ant>
  
          <copy todir="${dist.lib.dir}">
              <fileset dir="${framework.dir}/${dist.lib.dir}"/>
          </copy>
  
          <copy todir="${dist.web.dir}">
              <fileset dir="${framework.dir}/${dist.web.dir}"/>
          </copy>
  
          <!-- Copy javadoc in correct directory -->
          <copy todir="${dist.doc.api.dir}/framework/j2ee${j2ee.api}">
              <fileset dir="${framework.dir}/${dist.doc.api.dir}"/>
          </copy>
  
      </target>
  
      <!-- Generate Cactus Servlet Sample deliverables -->
      <target name="dist.sample-servlet" depends="clean.sample-servlet">
  
           <ant target="dist" antfile="${sample-servlet.dir}/build.xml"
              inheritAll="false">
  
              <property file="build.properties" />
              <property file="${user.home}/build.properties" />
  
              <property name="base.dir" value="${sample-servlet.dir}"/>
              <property name="project.version" value="${project.version}"/>
              <property name="year" value="${year}"/>
              <property name="debug" value="${debug}"/>
              <property name="optimize" value="${optimize}"/>
              <property name="deprecation" value="${deprecation}"/>
              <property name="dist.dir"
                  value="${sample-servlet.dir}/${dist.dir}"/>
              <property name="dist.bin.dir"
                  value="${sample-servlet.dir}/${dist.dir}/bin"/>
              <property name="dist.doc.dir"
                  value="${sample-servlet.dir}/${dist.doc.dir}"/>
              <property name="dist.doc.api.dir"
                  value="${sample-servlet.dir}/${dist.doc.api.dir}"/>
              <property name="sample.zip.name" value="sample-servlet"/>
              <property name="cactus.ant.jar" value="${anttasks.jar}"/>
              <property name="cactus.framework.jar" value="${framework.jar}"/>
              <property name="cactus.framework.web"
                  value="${framework.dir}/${dist.web.dir}"/>
          </ant>
  
          <unzip src="${sample-servlet.dir}/${dist.dir}/bin/sample-servlet.zip"
              dest="${dist.dir}/sample-servlet"/>
  
      </target>
  
      <!-- Generate Documentation deliverables -->
      <target name="dist.documentation" depends="clean.documentation,dist.anttasks">
  
          <ant target="dist" antfile="${documentation.dir}/build.xml"
              inheritAll="false">
  
              <property file="build.properties" />
              <property file="${user.home}/build.properties" />
  
              <property name="base.dir" value="${documentation.dir}"/>
              <property name="project.version" value="${project.version}"/>
              <property name="year" value="${year}"/>
              <property name="dist.dir"
                  value="${documentation.dir}/${dist.dir}"/>
              <property name="dist.doc.dir"
                  value="${documentation.dir}/${dist.doc.dir}"/>
              <property name="cactus.ant.jar" value="${anttasks.jar}"/>
          </ant>
  
          <!-- Copy doc in correct directory -->
          <copy todir="${dist.doc.dir}">
              <fileset dir="${documentation.dir}/${dist.doc.dir}"/>
          </copy>
  
      </target>
  
      <!-- Generate all distributables -->
      <target name="dist"
          depends="clean.cactus,dist.anttasks,dist.framework,dist.sample-servlet,dist.documentation">
      </target>
  
     <!--
         ========================================================================
           Clean generated files (including distributables)
         ========================================================================
      -->
      <target name="clean.anttasks" depends="init">
  
          <ant target="clean" antfile="${anttasks.dir}/build.xml"
              inheritAll="false">
  
              <property name="dist.dir" value="${anttasks.dir}/${dist.dir}"/>
          </ant>
  
      </target>
  
      <target name="clean.framework" depends="init">
  
          <ant target="clean" antfile="${framework.dir}/build.xml"
              inheritAll="false">
  
              <property name="dist.dir" value="${framework.dir}/${dist.dir}"/>
          </ant>
  
      </target>
  
      <target name="clean.sample-servlet" depends="init">
  
          <ant target="clean" antfile="${sample-servlet.dir}/build.xml"
              inheritAll="false">
  
              <property name="dist.dir"
                  value="${sample-servlet.dir}/${dist.dir}"/>
          </ant>
  
      </target>
  
      <target name="clean.documentation" depends="init">
  
          <ant target="clean" antfile="${documentation.dir}/build.xml"
              inheritAll="false">
  
              <property name="dist.dir"
                  value="${documentation.dir}/${dist.dir}"/>
          </ant>
  
      </target>
  
      <target name="clean.cactus" depends="init">
  
          <delete dir="${target.dir}"/>
          <delete dir="${dist.dir}"/>
          <delete dir="${release.dir}"/>
  
      </target>
  
      <target name="clean"
          depends="clean.cactus,clean.anttasks,clean.framework,clean.sample-servlet,clean.documentation"
          description="Clean all generated files">
      </target>
  
      <!--
         ========================================================================
           Common script for both "release" and "nightly" targets. Must only be
           called by "release" or "nightly" target as it needs the following
           properties defined before calling it :
  
               anttasks.release.name
  
         ========================================================================
      -->
      <target name="release.common" depends="dist">
  
          <mkdir dir="${target.lib.dir}"/>
          <mkdir dir="${release.dir}"/>
  
          <!-- Copy external libraries in a tmp directory for them to be included
               in the distribution -->
          <copy todir="${target.lib.dir}" file="${log4j.jar}"/>
          <copy todir="${target.lib.dir}" file="${commons.httpclient.jar}"/>
          <copy todir="${target.lib.dir}" file="${httpunit.jar}"/>
          <copy todir="${target.lib.dir}" file="${junit.jar}"/>
          <copy todir="${target.lib.dir}" file="${aspectjrt.jar}"/>
  
          <zip zipfile="${release.dir}/${cactus.release.name}.zip">
              <fileset dir="${dist.dir}"/>
  
              <!-- Add the external libraries to the zip (except the j2ee.jar one
                   as it is already present in containers -->
              <zipfileset dir="${target.lib.dir}" prefix="lib">
                  <include name="*.jar"/>
              </zipfileset>
  
              <!-- Add the licenses -->
              <fileset dir=".">
                  <include name="LICENSE.*"/>
              </fileset>
          </zip>
  
      </target>
  
      <!--
         ========================================================================
           Generate a full release (i.e. the zipped release file)
         ========================================================================
      -->
      <target name="release.prepare" depends="init">
  
          <!-- For a release, the suffix is the version -->
          <property name="project.suffix" value="-${project.version}"/>
  
          <!-- Name of full release -->
          <property name="cactus.release.name"
              value="${project.prefix}${project.name.file}-${j2ee.api}${project.suffix}"/>
  
      </target>
  
      <target name="release" depends="release.prepare,release.common"
          description="Generate a release">
      </target>
  
      <!--
         ========================================================================
           Generate a nightly release (i.e. the zipped release file)
         ========================================================================
      -->
      <target name="nightly.prepare" depends="init">
  
          <!-- Sets the date for the release prefix : YYYYMMDD -->
          <tstamp/>
  
          <!-- Suffix to add to all distributable files -->
          <property name="project.suffix" value="-${DSTAMP}"/>
  
          <!-- Name of nightly release -->
          <property name="cactus.release.name"
              value="${project.prefix}${project.name.file}-${j2ee.api}${project.suffix}"/>
  
      </target>
  
      <target name="nightly" depends="nightly.prepare,release.common"
          description="Generate a nightly release">
      </target>
  
  </project>
  
  
  

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>