commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rwaldh...@apache.org
Subject cvs commit: jakarta-commons/pool build.xml
Date Sat, 04 May 2002 13:00:00 GMT
rwaldhoff    02/05/04 06:00:00

  Modified:    pool     build.xml
  Log:
  more robust dist target (borrowed from commons-collections)
  
  Revision  Changes    Path
  1.9       +76 -4     jakarta-commons/pool/build.xml
  
  Index: build.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/pool/build.xml,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- build.xml	29 Apr 2002 19:56:40 -0000	1.8
  +++ build.xml	4 May 2002 13:00:00 -0000	1.9
  @@ -1,4 +1,4 @@
  -<!-- $Id: build.xml,v 1.8 2002/04/29 19:56:40 craigmcc Exp $ -->
  +<!-- $Id: build.xml,v 1.9 2002/05/04 13:00:00 rwaldhoff Exp $ -->
   <project name="commons-pool" default="test" basedir=".">
   
      <!-- patternset describing files to be copied from the doc directory -->
  @@ -54,6 +54,9 @@
         <property name="Name" value="Commons-Pool"/>
         <property name="Name-Long" value="Jakarta Commons Object Pooling Package"/>
   
  +      <!-- The current version number of this component -->
  +      <property name="component.version" value="1.0-beta1"/>
  +
         <property name="test.entry" value="org.apache.commons.pool.TestAll"/>
         <property name="test.failonerror" value="true" /> 
         <property name="test.runner" value="junit.textui.TestRunner" /> 
  @@ -71,6 +74,26 @@
         <property name="dest.jardir" value="${dest}"/>
         <property name="dest.jardir.jar" value="${dest.jardir}/${name}.jar"/>
   
  +      <property name="bin.name" value="${name}-${component.version}"/>
  +      <property name="dest.bin.tar" value="${dest}/${bin.name}.tar"/>
  +      <property name="dest.bin.tar.gz" value="${dest}/${bin.name}.tar.gz"/>
  +      <property name="dest.bin.zip" value="${dest}/${bin.name}.zip"/>
  +      
  +      <property name="src.name" value="${bin.name}-src"/>
  +      <property name="dest.src.tar" value="${dest}/${src.name}.tar"/>
  +      <property name="dest.src.tar.gz" value="${dest}/${src.name}.tar.gz"/>
  +      <property name="dest.src.zip" value="${dest}/${src.name}.zip"/>
  +      
  +      <patternset id="patternset-exclude-distros">
  +        <exclude name="**/${bin.name}.tar.gz"/>
  +        <exclude name="**/${bin.name}.zip"/>
  +        <exclude name="**/${src.name}.tar.gz"/>
  +        <exclude name="**/${src.name}.zip"/>
  +      </patternset>
  +      
  +      <!-- set the cvs.root property in the build.properties file -->
  +      <property name="cvs.tag" value="POOL_1_0"/>      
  +
         <available property="available-doc" file="${source.doc}"/> <!-- does this
module have docs? -->
         <available property="available-src-java" file="${source.src.java}"/> <!--
does this module have java src? -->      
         <available property="available-src-test" file="${source.src.test}"/> <!--
does this module have test src? -->      
  @@ -126,7 +149,8 @@
   
      <target name="doc-top" depends="init">
         <mkdir  dir="${dest}"/>
  -      <copy todir="${dest}" file="../LICENSE"/>
  +      <copy todir="${dest}" file="${basedir}/LICENSE"/>
  +      <copy todir="${dest}" file="${basedir}/README.txt"/>
      </target>
   
      <target name="doc-copy" depends="init" if="available-doc">
  @@ -166,6 +190,7 @@
                  nohelp="true"
                  nonavbar="false"
                  serialwarn="false">
  +          <link href="http://java.sun.com/products/jdk/1.3/docs/api"/>
         </javadoc>
         <delete dir="${workdir}"/>
      </target>
  @@ -221,7 +246,7 @@
   
      <!-- ######################################################### -->
   
  -   <target name="dist" depends="dist-jar,doc" description="builds binary distribution"/>
  +   <target name="dist" depends="dist-jar,doc,dist-tar,dist-zip" description="builds
binary distribution"/>
   
      <target name="dist-jar" depends="build">
         <mkdir dir="${dest.jardir}"/>
  @@ -231,10 +256,57 @@
               <patternset refid="patternset-non-test-classes"/>
            </fileset>
         </copy>
  -      <jar jarfile="${dest.jardir.jar}">
  +      
  +      <mkdir dir="${workdir}/META-INF"/>
  +      <copy todir="${workdir}/META-INF" file="./LICENSE"/>
  +      
  +      <jar jarfile="${dest.jardir.jar}" manifest="${source.src}/conf/MANIFEST.MF">
            <fileset dir="${workdir}"/>
         </jar>
         <delete dir="${workdir}"/>
  +      <delete dir="${dest.classes}"/>
  +      
  +   </target>
  +   
  +   <target name="dist-tar" depends="dist-jar,doc">
  +
  +      <mkdir dir="${workdir}/${bin.name}"/>
  +      <copy todir="${workdir}/${bin.name}">
  +         <fileset dir="${dest}">         
  +            <patternset refid="patternset-exclude-distros"/>
  +         </fileset>
  +      </copy>
  +      
  +      <!-- create tar.gz -->
  +      <tar longfile="gnu" tarfile="${dest.bin.tar}">
  +        <tarfileset dir="${workdir}"/>
  +      </tar>
  +      
  +      <gzip zipfile="${dest.bin.tar.gz}"
  +      	    src="${dest.bin.tar}">
  +      </gzip>
  +      <delete file="${dest.bin.tar}" />
  +      
  +      <delete dir="${workdir}"/>
  +   
  +   </target>  
  +
  +   <target name="dist-zip" depends="dist-jar,doc">
  +
  +      <mkdir dir="${workdir}/${bin.name}"/>
  +      <copy todir="${workdir}/${bin.name}">
  +         <fileset dir="${dest}">         
  +            <patternset refid="patternset-exclude-distros"/>
  +         </fileset>
  +      </copy>
  +            
  +      <!-- create a zip file -->
  +      <zip zipfile="${dest.bin.zip}" >
  +        <zipfileset dir="${workdir}" />
  +      </zip>
  +      
  +      <delete dir="${workdir}"/>
  +   
      </target>
   
      <!-- ######################################################### -->
  
  
  

--
To unsubscribe, e-mail:   <mailto:commons-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:commons-dev-help@jakarta.apache.org>


Mime
View raw message