commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From di...@apache.org
Subject cvs commit: jakarta-commons/pool build.xml
Date Sat, 04 Oct 2003 18:10:27 GMT
dirkv       2003/10/04 11:10:27

  Modified:    pool     build.xml
  Log:
  update ant build
  
  Revision  Changes    Path
  1.20      +63 -329   jakarta-commons/pool/build.xml
  
  Index: build.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/pool/build.xml,v
  retrieving revision 1.19
  retrieving revision 1.20
  diff -u -r1.19 -r1.20
  --- build.xml	31 Oct 2002 21:00:25 -0000	1.19
  +++ build.xml	4 Oct 2003 18:10:27 -0000	1.20
  @@ -1,32 +1,6 @@
   <!-- $Id$ -->
   <project name="commons-pool" default="test" basedir=".">
   
  -   <!-- patternset describing files to be copied from the doc directory -->
  -   <patternset id="patternset-doc"/>
  -
  -   <!-- patternset describing test classes -->
  -   <patternset id="patternset-test-classes">
  -      <include name="**/Test*.class"/>
  -   </patternset>
  -
  -   <!-- patternset describing non test classes -->
  -   <patternset id="patternset-non-test-classes">
  -      <include name="**/*.class"/>
  -      <exclude name="**/Test*.class"/>
  -   </patternset>
  -
  -   <!-- patternset describing non test source files (*.java, *html, etc.) -->
  -   <patternset id="patternset-javadocable-sources">
  -      <include name="**/*"/>
  -      <exclude name="**/Test*.java"/>
  -   </patternset>
  -   
  -   <!-- Anakia props -->
  -   <property name="docs.src" value="./xdocs"/>
  -   <property name="docs.dest" value="./docs"/>
  -
  -   <!-- ######################################################### -->
  -
      <target name="init">
         <tstamp/>
   
  @@ -51,138 +25,49 @@
         <property name="classpath" value="${cp}:${commons-collections.jar}:${junit.jar}"/>
   
         <property name="name" value="commons-pool"/>
  -      <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="2.0-dev"/>
  +      <property name="title" value="Jakarta Commons Object Pooling Package"/>
  +      <property name="version" value="Nightly-${DSTAMP}${TSTAMP}"/>
  +      <property name="package" value="org.apache.commons.pool.*"/>
  +
  +      <property name="src.dir" value="${basedir}/src"/>
  +      <property name="src.java.dir" value="${src.dir}/java"/>
  +      <property name="src.test.dir" value="${src.dir}/test"/>
  +      <property name="build.dir" value="${basedir}/build"/>
  +      <property name="build.classes.dir" value="${build.dir}/classes"/>
  +      <property name="build.test-classes.dir" value="${build.dir}/test-classes"/>
  +      <property name="dist.dir" value="${basedir}/dist"/>
  +      <property name="dist.jar" value="${dist.dir}/${name}.jar"/>
   
         <property name="test.entry" value="org.apache.commons.pool.TestAll"/>
         <property name="test.failonerror" value="true" /> 
         <property name="test.runner" value="junit.textui.TestRunner" /> 
  -      
  -      <property name="workdir" value="${java.io.tmpdir}/buildtemp_${DSTAMP}${TSTAMP}"/>
  -      <property name="source" value="${basedir}"/>
  -      <property name="source.src" value="${basedir}/src"/>
  -      <property name="source.src.java" value="${source.src}/java"/>
  -      <property name="source.src.test" value="${source.src}/test"/>
  -      <property name="source.doc" value="${basedir}/doc"/>
  -      <property name="dest" value="${basedir}/dist"/>
  -      <property name="dest.classes" value="${dest}/classes"/>
  -      <property name="dest.doc" value="${dest}/docs"/>
  -      <property name="dest.doc.api" value="${dest.doc}/api"/>
  -      <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>
  +     
  +      <property name="javadoc.dir" value="${dist.dir}/docs/api"/>
  +      <property name="javadoc.bottom" value="&lt;small&gt;Copyright &amp;copy;
2001-2003 Apache Software Foundation. Documenation generated ${TODAY}&lt;/small&gt;."/>
  +      <property name="javadoc.overview" value="${src.java.dir}/org/apache/commons/pool/overview.html"
/>
   
         <property name="javac.optimize" value="false"/>
         <property name="javac.debug" value="true"/>
         <property name="javac.deprecation" value="true"/>
  -      
  -      <!-- 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? -->      
  -
  -   </target>
  -
  -   <!-- ######################################################### -->
  -
  -   <target name="copy-javadoc-source" depends="init" if="available-src-java">
  -      <mkdir dir="${javadoc-source-dir}"/>
  -      <copy todir="${javadoc-source-dir}" filtering="no">
  -         <fileset dir="${source.src.java}">
  -            <patternset refid="patternset-javadocable-sources"/>
  -         </fileset>
  -      </copy>
  -   </target>
  -
  -   <target name="copy-doc" depends="init" if="available-doc">
  -      <mkdir dir="${doc-source-dir}/${name}"/>
  -      <copy todir="${doc-source-dir}/${name}" filtering="no">
  -         <fileset dir="${source.doc}">
  -            <patternset refid="patternset-doc"/>
  -         </fileset>
  -      </copy>
      </target>
   
      <!-- ######################################################### -->
   
      <target name="clean" depends="init" description="removes generated files">
  -      <delete dir="${dest}"/>
  -   </target>
  -
  -   <target name="clean-doc" depends="init,clean-javadoc">
  -      <delete dir="${dest.doc}"/>
  -   </target>
  -
  -   <target name="clean-javadoc" depends="init">
  -      <delete dir="${dest.doc.api}"/>
  -   </target>
  -
  -   <target name="clean-build" depends="init">
  -      <delete dir="${dest.classes}"/>
  -   </target>
  -
  -   <target name="clean-dist" depends="init">
  -      <delete file="${dest.jardir.jar}"/>
  -   </target>
  -
  -   <!-- ######################################################### -->
  -
  -   <target name="doc" depends="init,doc-top,doc-copy,doc-javadoc" description="generates
javadocs and other documentation">
  -   </target>
  -
  -   <target name="doc-top" depends="init">
  -      <mkdir  dir="${dest}"/>
  -      <copy todir="${dest}" file="${basedir}/LICENSE.txt"/>
  -      <copy todir="${dest}" file="${basedir}/README.txt"/>
  +      <delete dir="${build.dir}"/>
  +      <delete dir="${dist.dir}"/>
      </target>
   
  -   <target name="doc-copy" depends="init" if="available-doc">
  -      <mkdir dir="${dest.doc}"/>
  -      <copy todir="${dest.doc}">
  -      <fileset dir="${source.doc}">
  -         <patternset refid="patternset-doc"/>
  -      </fileset>
  -      </copy>
  -   </target>
  -
  -   <target name="doc-javadoc" depends="init" if="available-src-java">
  -      <!-- copy all the non-test sources out to the work directory and javadoc that
-->
  -      <mkdir dir="${workdir}"/>
  -      <copy todir="${workdir}">
  -        <fileset dir="${source.src.java}">
  -          <patternset refid="patternset-javadocable-sources"/>
  -        </fileset>
  -      </copy>
  -      <mkdir dir="${dest.doc.api}"/>
  +   <target name="javadoc" depends="init" description="generates javadocs">
  +      <mkdir dir="${javadoc.dir}"/>
         <javadoc packagenames="org.*"
  -               sourcepath="${workdir}"
  +               sourcepath="${src.java.dir}"
                  classpath="${classpath}"
  -               destdir="${dest.doc.api}"
  -               windowtitle="${Name-Long}"
  -               doctitle="${Name-Long}"
  -               bottom="&lt;small&gt;Copyright &amp;copy; 2001-2002 Apache Software
Foundation. Documenation generated ${TODAY}&lt;/small&gt;."
  -               overview="${workdir}/org/apache/commons/pool/overview.html"
  +               destdir="${javadoc.dir}"
  +               windowtitle="${title}"
  +               doctitle="${title}"
  +               bottom="${javadoc.bottom}"
  +               overview="${javadoc.overview}"
                  public="true"
                  version="true"
                  author="true"
  @@ -196,221 +81,70 @@
                  serialwarn="false">
             <link href="http://java.sun.com/products/jdk/1.3/docs/api"/>
         </javadoc>
  -      <delete dir="${workdir}"/>
      </target>
   
      <!-- ######################################################### -->
   
  -   <target name="build" depends="init,build-java" description="compiles source files"/>
  -
  -   <target name="build-java" depends="init" if="available-src-java">
  -      <mkdir dir="${dest.classes}"/>
  -      <javac destdir="${dest.classes}"
  -             srcdir="${source.src.java}"
  +   <target name="compile" depends="init" description="compiles source files">
  +      <mkdir dir="${build.classes.dir}"/>
  +      <javac destdir="${build.classes.dir}"
  +             srcdir="${src.java.dir}"
                classpath="${classpath}"
                debug="${javac.debug}"
                deprecation="${javac.deprecation}"
                optimize="${javac.optimize}"/>
      </target>
      
  -   <target name="build-test" depends="init,build-java" if="available-src-test">
  -      <mkdir dir="${dest.classes}"/>
  -      <javac destdir="${dest.classes}"
  -             srcdir="${source.src.test}"
  -             classpath="${classpath}"
  +   <target name="compile-test" depends="compile">
  +      <mkdir dir="${build.test-classes.dir}"/>
  +      <javac destdir="${build.test-classes.dir}"
  +             srcdir="${src.test.dir}"
                debug="${javac.debug}"
                deprecation="${javac.deprecation}"
  -             optimize="${javac.optimize}"/>
  +             optimize="${javac.optimize}">
  +        <classpath>
  +          <pathelement location="${build.classes.dir}" /> 
  +          <pathelement location="${build.test-classes.dir}" /> 
  +          <pathelement path="${classpath}" /> 
  +        </classpath>
  +      </javac>
      </target>
   
  -   <!-- ######################################################### -->
  -
  -   <target name="test" depends="build-test" if="test.entry" description="runs (junit)
unit tests">
  +   <target name="test" depends="compile-test" description="runs (junit) unit tests">
         <echo message="Because we need to sleep to test the eviction threads, this takes
a little while (around 35 seconds)..."/>
         <java classname="${test.runner}" fork="yes" failonerror="${test.failonerror}">
           <arg value="${test.entry}"/> 
           <classpath>
  -          <pathelement location="${dest.classes}" /> 
  +          <pathelement location="${build.classes.dir}" /> 
  +          <pathelement location="${build.test-classes.dir}" /> 
             <pathelement path="${classpath}" /> 
  -          <pathelement path="${java.class.path}" /> 
           </classpath>
         </java>
      </target>
   
  -   <!-- ######################################################### -->
  -
  -   <target name="dist" depends="dist-jar,doc,dist-tar,dist-zip" description="builds
binary distribution"/>
  +   <target name="build-jar" depends="compile">
  +      <mkdir dir="${dist.dir}"/>
  +      <jar jarfile="${dist.jar}">
  +         <fileset dir="${build.dir}"/>
  +         <metainf dir="${basedir}" includes="LICENSE.txt"/>
  +         <manifest>
  +            <attribute name="Built-By" value="${user.name}"/>
  +            <attribute name="Package" value="${package}"/>
  +            <attribute name="Extension-Name" value="${name}"/>
  +            <attribute name="Specification-Vendor" value="Apache Software Foundation"/>
  +            <attribute name="Specification-Title" value="${title}"/>
  +            <attribute name="Implementation-Version" value="${version}"/>
  +            <attribute name="Implementation-Vendor" value="Apache Software Foundation"/>
   
  -   <target name="dist-jar" depends="build">
  -      <mkdir dir="${dest.jardir}"/>
  -      <mkdir dir="${workdir}"/>
  -      <copy todir="${workdir}">
  -         <fileset dir="${dest.classes}">
  -            <patternset refid="patternset-non-test-classes"/>
  -         </fileset>
  -      </copy>
  -      
  -      <mkdir dir="${workdir}/META-INF"/>
  -      <copy todir="${workdir}/META-INF" file="./LICENSE.txt"/>
  -      
  -      <jar jarfile="${dest.jardir.jar}" manifest="${source.src}/conf/MANIFEST.MF">
  -         <fileset dir="${workdir}"/>
  +         </manifest>
         </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 name="build" depends="clean,build-jar,javadoc">
  +      <copy todir="${dist.dir}" file="${basedir}/LICENSE.txt"/>
  +      <copy todir="${dist.dir}" file="${basedir}/README.txt"/>
      </target>
   
  -   <!-- ######################################################### -->
  -
  -   <target name="dist-src" depends="init">
  -   
  -      <!-- not executed in default dist, because it is configuration-rich
  -        and requires an active network connection -->
  -                       
  -      <mkdir dir="${workdir}"/>
  -      <mkdir dir="${dest.jardir}"/>
  -
  -      <cvs dest="${workdir}" cvsRoot="${cvs.root}" 
  -          package="jakarta-commons" tag="${cvs.tag}"/>
  -      <move toDir="${workdir}/${src.name}">
  -        <fileset dir="${workdir}/jakarta-commons/pool"/>
  -      </move>
  -      <delete dir="${workdir}/jakarta-commons"/> 
  -      <copy file="${basedir}/LICENSE.txt" toDir="${workdir}/${src.name}"/>
  -      
  -      <!-- create tar.gz -->
  -      <tar longfile="gnu" tarfile="${dest.src.tar}">
  -        <tarfileset dir="${workdir}"/>
  -      </tar>
  -      
  -      <gzip zipfile="${dest.src.tar.gz}"
  -      	    src="${dest.src.tar}">
  -      </gzip>
  -      <delete file="${dest.src.tar}" />
  -      
  -      <!-- create a zip file -->
  -      <zip zipfile="${dest.src.zip}" >
  -        <zipfileset dir="${workdir}" />
  -      </zip>
  -             
  -      <delete dir="${workdir}"/>
  +   <target name="dist" depends="build" description="gump target"/>
      
  -   </target>
  -
  -   <!-- ######################################################### -->
  -
  -  <target name="xdoc.fetch-stylesheet" unless="localstylesheet">
  -      <echo>
  -       ####################################################################
  -       #
  -       #  Fetching the latest stylesheet from jakarta-site2
  -       #
  -       #  NOTE : As this build target is meant for developers, this requires
  -       #    a properly setup CVS.  But you are encouraged to use this to
  -       #    experiment with Anakia - if the fetch fails, it may be because
  -       #    you haven't yet logged into CVS. The way to do it, assuming you
  -       #    have a resonable CVS client setup is
  -       #
  -       #  $ cvs -d :pserver:anoncvs@cvs.apache.org:/home/cvspublic login
  -       #  password: anoncvs
  -       #
  -       #  and that should solve it.
  -       #
  -       #  See http://jakarta.apache.org/site/cvsindex.html for more
  -       #      information, or http://www.cvshome.org/
  -       #
  -       #  Ant really is the bee's knees. http://jakarta.apache.org/ant/
  -       #
  -       ######################################################################
  -       </echo>
  -      <cvspass cvsroot=":pserver:anoncvs@cvs.apache.org:/home/cvspublic"
  -          password="anoncvs"
  -      />
  -      <cvs cvsRoot=":pserver:anoncvs@cvs.apache.org:/home/cvspublic"
  -          command="checkout -p jakarta-site2/xdocs/stylesheets/site.vsl"
  -          output="${docs.src}/stylesheets/site.vsl"
  -      />
  -	</target>
  -
  -  <target name="xdoc" depends="init,xdoc.fetch-stylesheet"
  -          description="Generates HTML documentation from XML source">
  -      <mkdir      dir="${dist.home}"/>
  -      <mkdir      dir="${dist.home}/docs"/>
  -      <taskdef name="anakia" classname="org.apache.velocity.anakia.AnakiaTask">
  -          <classpath location="${velocity.jar}"/>
  -          <classpath location="${jdom.jar}"/>
  -          <classpath location="${xerces.jar}"/>
  -          <classpath location="${commons-collections.jar}"/>
  -      </taskdef>
  -
  -      <echo>
  -       #######################################################
  -       #
  -       #  Now using Anakia to transform our XML documentation
  -       #  to HTML.
  -       #
  -       #######################################################
  -       </echo>
  -
  -      <anakia basedir="${docs.src}" destdir="${docs.dest}/"
  -           extension=".html" style="./site.vsl"
  -           projectFile="stylesheets/project.xml"
  -           excludes="**/stylesheets/** empty.xml"
  -           includes="**/*.xml"
  -           lastModifiedCheck="true"
  -           templatePath="xdocs/stylesheets">
  -      </anakia>
  -
  -      <copy todir="${docs.dest}/images" filtering="no">
  -          <fileset dir="${docs.src}/images">
  -              <include name="**/*.gif"/>
  -              <include name="**/*.jpeg"/>
  -              <include name="**/*.jpg"/>
  -          </fileset>
  -      </copy>
  -  </target>
  -
  -
   </project>
  
  
  

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


Mime
View raw message