vmassol     01/04/09 01:36:43

  Modified:    cactus/build build-servletapi.xml build.properties.tests
                        build.xml
  Log:
  new distribution mechanism
  
  Revision  Changes    Path
  1.4       +50 -89    jakarta-commons-sandbox/cactus/build/build-servletapi.xml
  
  Index: build-servletapi.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/cactus/build/build-servletapi.xml,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- build-servletapi.xml      2001/04/07 13:19:08     1.3
  +++ build-servletapi.xml      2001/04/09 08:36:41     1.4
  @@ -59,15 +59,17 @@
       <!-- Destination locations for the build (relative to the basedir as
            specified in the basedir attribute of the project tag) -->
       <property name="out.dir" value="${out.root.dir}/servlet${servlet.api}"/>
  +    <property name="out.dist.dir" value="${out.dir}/dist"/>
  +    <property name="out.lib.dir" value="${out.dist.dir}/lib"/>
       <property name="out.src.dir" value="${out.dir}/src"/>
       <property name="out.classes.dir" value="${out.dir}/classes"/>
  -    <property name="out.doc.dir" value="${out.dir}/doc"/>
  +    <property name="out.doc.dir" value="${out.dist.dir}/doc"/>
       <property name="out.javadoc.dir" value="${out.doc.dir}/javadoc"/>
       <property name="out.conf.dir" value="${out.dir}/conf"/>
   
       <!-- Destination locations for the Cactus sample application
            (also used as functional tests for Cactus) -->
  -    <property name="out.sample.dir" value="${out.dir}/sample"/>
  +    <property name="out.sample.dir" value="${out.dist.dir}/sample"/>
       <property name="out.sample.build.dir" value="${out.sample.dir}/build"/>
       <property name="out.sample.etc.dir" value="${out.sample.build.dir}/etc"/>
       <property name="out.sample.conf.dir" value="${out.sample.dir}/conf"/>
  @@ -81,46 +83,31 @@
          ========================================================================
       -->
   
  +    <!-- The full distribution name -->
  +    <property name="full.name" value="${project.name}-${servlet.api}"/>
  +
       <!-- The Cactus jar file. This is the file that should be used at
            runtime by end users -->
  -    <property name="jar.name" value="${project.name}-${servlet.api}"/>
  -
  -    <!-- The Cactus documentation for a given Servlet API in a zip :
  -         web site + javadoc + other READMEs. This file should be used by
  -         end users for getting help about Cactus -->
  -    <property name="doc.name" value="${project.name}-doc-${servlet.api}"/>
  +    <property name="jar.name" value="${project.name}"/>
   
       <!-- The Cactus javadocs for Servlet API 2.2 and 2.3.
            These files do not need to be redistributed to end-users. It is
            only needed to put the javadoc online to the Cactus web site. -->
       <property name="javadoc.name" value="${project.name}-javadoc-${servlet.api}"/>
   
  -    <!-- The Cactus sample zip for a given servlet API. -->
  -    <property name="sample.name" value="${project.name}-sample-${servlet.api}"/>
  -
       <!-- 
          ========================================================================
            Full names of deliverables
          ========================================================================
       -->
   
  +    <!-- The full distribution name -->
  +    <property name="final.full.name" value="${out.dist.dir}/${full.name}"/>
  +
       <!-- The Cactus jar file. This is the file that should be used at
            runtime by end users -->
  -    <property name="final.jar.name" value="${out.root.dir}/${jar.name}.jar"/>
  -
  -    <!-- The Cactus documentation for a given Servlet API in a zip :
  -         web site + javadoc + other READMEs. This file should be used by
  -         end users for getting help about Cactus -->
  -    <property name="final.doc.name" value="${out.root.dir}/${doc.name}.zip"/>
  +    <property name="final.jar.name" value="${out.lib.dir}/${jar.name}.jar"/>
   
  -    <!-- The Cactus javadocs for Servlet API 2.2 and 2.3.
  -         These files do not need to be redistributed to end-users. It is
  -         only needed to put the javadoc online to the Cactus web site. -->
  -    <property name="final.javadoc.name" value="${out.root.dir}/${javadoc.name}"/>
  -
  -    <!-- The Cactus sample zip for a given servlet API. -->
  -    <property name="final.sample.name" value="${out.root.dir}/${sample.name}.zip"/>
  -
       <!-- 
          ========================================================================
            Useful file patterns for targets
  @@ -142,9 +129,6 @@
           <include name="**/*.xml"/>
           <include name="**/*.properties"/>
   
  -        <!-- Other misc files -->
  -        <include name="**/license.apl"/>
  -
       </patternset>
   
       <!-- All non java files in the src directory -->
  @@ -155,9 +139,6 @@
           <include name="**/*.xml"/>
           <include name="**/*.properties"/>
   
  -        <!-- Other misc files -->
  -        <include name="**/license.apl"/>
  -
       </patternset>
   
       <!-- 
  @@ -185,24 +166,15 @@
           <!-- Full names of distributables. They are defined here because the
                properties need to have a valid ${DSTAMP} property set and the
                tstamp task need to be located in a target -->
  -    
  -        <!-- The Cactus jar file. This is the file that should be used at
  -             runtime by end users -->
  -        <property name="dist.jar.name" 
value="${dist.dir}/${jar.name}-${DSTAMP}.jar"/>
  -    
  -        <!-- The Cactus documentation for a given Servlet API in a zip :
  -             web site + javadoc + other READMEs. This file should be used by
  -             end users for getting help about Cactus -->
  -        <property name="dist.doc.name" 
value="${dist.dir}/${doc.name}-${DSTAMP}.zip"/>
  -    
  +
  +        <!-- The full distribution name -->
  +        <property name="dist.full.name" value="${dist.dir}/${full.name}-${DSTAMP}"/>
  +
           <!-- The Cactus javadocs for Servlet API 2.2 and 2.3.
                These files do not need to be redistributed to end-users. It is
                only needed to put the javadoc online to the Cactus web site. -->
  -        <property name="dist.javadoc.name" 
value="${dist.dir}/${javadoc.name}-${DSTAMP}"/>
  -    
  -        <!-- The Cactus sample zip for a given servlet API. -->
  -        <property name="dist.sample.name" 
value="${dist.dir}/${sample.name}-${DSTAMP}.zip"/>
  -
  +        <property name="dist.javadoc.name" 
value="${out.root.dir}/${javadoc.name}-${DSTAMP}"/>
  +              
       </target>
   
       <!-- 
  @@ -286,9 +258,6 @@
               <exclude name="**/*.xml"/>
               <exclude name="**/*.properties"/>
   
  -            <!-- Misc files -->
  -            <exclude name="**/license.apl"/>
  -
               <classpath>
                   <pathelement path="${java.class.path}"/>
                   <pathelement location="${servlet.jar}"/>
  @@ -317,6 +286,7 @@
       <target name="prepare-jar" depends="compile">
   
           <mkdir dir="${out.conf.dir}"/>
  +        <mkdir dir="${out.lib.dir}"/>
   
           <!-- Copy the manifest in order to replace the version token filter -->
           <copy todir="${out.conf.dir}" filtering="on">
  @@ -358,13 +328,13 @@
   
           <javadoc
               sourcepath="${out.src.dir}"
  -            packagenames="org.apache.commons.${project.name}.*"
  +            packagenames="org.apache.commons.cactus.*"
               destdir="${out.javadoc.dir}"
               author="true"
               public="true"
               version="true"
               use="true"
  -            
overview="${out.src.dir}/org/apache/commons/${project.name}/overview.html"
  +            overview="${out.src.dir}/org/apache/commons/cactus/overview.html"
               windowtitle="${project.fullname} ${project.version} for Servlet 
${servlet.api} API"
               doctitle="${project.fullname} ${project.version} for Servlet 
${servlet.api} API"
               bottom="Copyright &amp;copy; ${year} Apache Software Foundation. All 
Rights Reserved.">
  @@ -383,16 +353,16 @@
                of the end-user redistributable. It is simply to help create the
                web site -->
   
  -        <tar tarfile="${final.javadoc.name}.tar" basedir="${out.javadoc.dir}"/>
  -        <gzip zipfile="${final.javadoc.name}.tar.gz" 
src="${final.javadoc.name}.tar"/>
  -        <delete file="${final.javadoc.name}.tar"/>
  +        <tar tarfile="${dist.javadoc.name}.tar" basedir="${out.javadoc.dir}"/>
  +        <gzip zipfile="${dist.javadoc.name}.tar.gz" src="${dist.javadoc.name}.tar"/>
  +        <delete file="${dist.javadoc.name}.tar"/>
   
       </target>
   
       <!-- 
          ========================================================================
            Generate the full documentation for a given Servlet API, i.e.
  -         web site + javadoc + README
  +         web site + javadoc
          ========================================================================
       -->
       <!-- Preparation target for the doc target -->
  @@ -407,10 +377,6 @@
           <copy file="${xdoc.dir}/doc-book.xml" tofile="${xdoc.dir}/book.xml"
               filtering="on"/>
   
  -        <!-- Copy the version.txt file -->
  -        <copy file="${conf.dir}/version.txt"
  -            tofile="${out.doc.dir}/version.txt" filtering="on"/>
  -
           <!-- Copy the images -->
           <copy todir="${out.site.dir}/images">
               <fileset dir="${xdoc.dir}/images"/>
  @@ -432,13 +398,6 @@
   
           </stylebook>
       
  -
  -        <!-- Add the README -->
  -        <copy file="README" tofile="${out.doc.dir}/README"/>
  -
  -        <!-- Create the zipped documentation -->
  -        <zip zipfile="${final.doc.name}" basedir="${out.doc.dir}"/>
  -
       </target>
   
       <!-- 
  @@ -510,7 +469,7 @@
           </copy>
   
           <!-- Copy license file -->
  -        <copy file="${src.dir}/license.apl" tofile="${out.sample.src.dir}"/>
  +        <copy file="LICENSE" tofile="${out.sample.dir}"/>
   
           <!-- Copy doc files -->
           <copy todir="${out.sample.doc.dir}">
  @@ -521,24 +480,9 @@
           <copy file="${sample.doc.dir}/README"
               tofile="${out.sample.dir}/README"/>
   
  -        <!-- Copy the version.txt file -->
  -        <copy file="${conf.dir}/version.txt"
  -            tofile="${out.sample.dir}/version.txt" filtering="on"/>
  -
       </target>
   
       <target name="sample" depends="prepare-sample">
  -
  -        <zip zipfile="${final.sample.name}" basedir="${out.sample.dir}">
  -
  -            <exclude name="build/build.properties"/>
  -            <exclude name="out/**"/>
  -            <exclude name="**/*.log"/>
  -            <exclude name="**/*.bak"/>
  -            <exclude name="**/*.class"/>
  -
  -        </zip>
  -
       </target>
   
       <!-- 
  @@ -674,15 +618,32 @@
            Build all distributables and copies them to the dist.dir directory
          ========================================================================
       -->
  -    <target name="dist" depends="jar,doc,sample">
  -    
  +    <target name="prepare-dist" depends="jar,doc,sample">
  +
           <mkdir dir="${dist.dir}"/>
  +        
  +        <!-- Copy the custom Ant tasks jar to the servlet API dist directory
  +        -->
  +        <copy file="${final.jar.ant.name}" todir="${out.lib.dir}"/>
  +
  +        <!-- Copy the license file -->
  +        <copy file="LICENSE" todir="${out.dist.dir}"/>
   
  -        <copy file="${final.jar.name}" tofile="${dist.jar.name}"/>
  -        <copy file="${final.doc.name}" tofile="${dist.doc.name}"/>
  -        <copy file="${final.javadoc.name}.tar.gz"
  -            tofile="${dist.javadoc.name}.tar.gz"/>
  -        <copy file="${final.sample.name}" tofile="${dist.sample.name}"/>
  +        <!-- Copy the README file -->
  +        <copy file="README" todir="${out.dist.dir}"/>
  +
  +        <!-- Copy the version.txt file -->
  +        <copy file="${conf.dir}/version.txt" todir="${out.dist.dir}"
  +            filtering="on"/>
  +
  +    </target>
  +
  +    <target name="dist" depends="prepare-dist">
  +    
  +        <zip zipfile="${dist.full.name}.zip">
  +            <zipfileset dir="${out.dist.dir}"
  +                prefix="${project.name}-${servlet.api}-${DSTAMP}"/>
  +        </zip>
   
       </target>
   
  
  
  
  1.2       +2 -2      jakarta-commons-sandbox/cactus/build/build.properties.tests
  
  Index: build.properties.tests
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/cactus/build/build.properties.tests,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- build.properties.tests    2001/03/31 20:22:35     1.1
  +++ build.properties.tests    2001/04/09 08:36:41     1.2
  @@ -7,8 +7,8 @@
   # the command line when starting Ant with the -D switch
   
   servlet.jar = @servlet.jar@
  -cactus.jar = [EMAIL PROTECTED]@.jar
  -cactus.ant.jar = [EMAIL PROTECTED]@.jar
  +cactus.jar = [EMAIL PROTECTED]@.jar
  +cactus.ant.jar = [EMAIL PROTECTED]@.jar
   [EMAIL PROTECTED]@
   
   # Servlet engine locations for the tests
  
  
  
  1.4       +14 -42    jakarta-commons-sandbox/cactus/build/build.xml
  
  Index: build.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/cactus/build/build.xml,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- build.xml 2001/04/08 19:41:09     1.3
  +++ build.xml 2001/04/09 08:36:42     1.4
  @@ -71,7 +71,7 @@
       <!-- Generic project properties -->
       <property name="project.fullname" value="Cactus"/>
       <property name="project.version" value="1.0-b1"/>
  -    <property name="project.name" value="cactus"/>
  +    <property name="project.name" value="commons-cactus"/>
   
       <!-- Miscellaneous settings -->
       <property name="year" value="2000-2001"/>
  @@ -151,9 +151,6 @@
       <!-- The Cactus jar containing custom Ant tasks and helper classes -->
       <property name="final.jar.ant.name" 
value="${out.root.dir}/${jar.ant.name}.jar"/>
   
  -    <!-- The full sources of Cactus in a zip file -->
  -    <property name="final.src.name" value="${out.root.dir}/${src.name}.zip"/>
  -
       <!-- The Cactus web site in a gzip file (without the Javadoc but
            with a link pointing to javadoc : <htdocs>/servletXX/index.html -->
       <property name="final.site.name" value="${out.root.dir}/${site.name}"/>
  @@ -179,9 +176,6 @@
           <include name="**/*.xml"/>
           <include name="**/*.properties"/>
   
  -        <!-- Other misc files -->
  -        <include name="**/license.apl"/>
  -
       </patternset>
   
       <!-- 
  @@ -270,7 +264,6 @@
           <echo message=" Available targets are :"/>
           <echo message=""/>
           <echo message=" jar              --> generates the jar file (default)"/>
  -        <echo message=" source           --> generates source zip of the project"/>
           <echo message=" doc              --> generates the docs (javadoc, ...)"/>
           <echo message=" site             --> generate the web site"/>
           <echo message=" sample           --> generate the sample application"/>
  @@ -341,33 +334,6 @@
   
       <!-- 
          ========================================================================
  -         Generates source zip of the project
  -       ========================================================================
  -    -->
  -    <target name="prepare-source" depends="init">
  -    
  -        <mkdir dir="${out.root.dir}"/>
  -
  -    </target>
  -
  -    <target name="source" depends="prepare-source">
  -
  -        <zip zipfile="${final.src.name}">
  -
  -            <fileset dir=".">
  -                <exclude name="${out.root.dir}/**"/>
  -                <exclude name="**/build.properties"/>
  -                <exclude name="**/*.log"/>
  -                <exclude name="**/*.bak"/>
  -                <exclude name="**/*.class"/>
  -            </fileset>
  -
  -        </zip>
  -
  -    </target>
  -
  -    <!-- 
  -       ========================================================================
            Generate the full documentation for a given Servlet API, i.e.
            web site + javadoc + README
          ========================================================================
  @@ -574,15 +540,22 @@
           </ant>        
   
       </target>
  -    <target name="dist" depends="clean,dist.22,dist.23,jar,sample,source,doc,site">
  +    <target name="dist" depends="clean,jar,sample,doc,site,dist.22,dist.23">
   
           <mkdir dir="${dist.dir}"/>
   
  -        <copy file="${final.jar.ant.name}" tofile="${dist.jar.ant.name}"/>
  -        <copy file="${final.src.name}" tofile="${dist.src.name}"/>
  -        <copy file="${final.site.name}-${DSTAMP}.tar.gz"
  -            tofile="${dist.site.name}-${DSTAMP}.tar.gz"/>
  +        <!-- Package the sources in the distribution -->
  +        <zip zipfile="${dist.src.name}">
   
  +            <zipfileset dir="." prefix="${project.name}-${DSTAMP}">
  +                <exclude name="${out.root.dir}/**"/>
  +                <exclude name="**/build.properties"/>
  +                <exclude name="**/*.log"/>
  +                <exclude name="**/*.bak"/>
  +                <exclude name="**/*.class"/>
  +            </zipfileset>
  +        </zip>
  +
       </target>
   
       <!-- 
  @@ -590,8 +563,7 @@
            Do it all
          ========================================================================
       -->
  -    <target name="all" depends="clean,jar,sample,source,doc,site,tests,dist">
  +    <target name="all" depends="clean,jar,sample,doc,site,tests,dist">
       </target>
  -
   
   </project>
  
  
  

Reply via email to