New ant build file

git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@131578 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Stephen Colebourne 2004-01-25 01:23:04 +00:00
parent 9cd2cfb039
commit 40d58bc828
4 changed files with 402 additions and 449 deletions

View File

@ -30,22 +30,15 @@ the location of the junit.jar on your computer.
Once you have Ant propertly installed, and the
build.properties file correctly reflects the location
of your junit.jar, you are ready to build and test.
The major targets are:
To compile and test the component :
$ ant test
To build a jar :
$ ant dist-jar
To build the API documentation :
$ ant doc
To build the jar and API doc at once :
$ ant dist
ant compile - compile the code
ant test - test using junit
ant jar - create a jar file
ant javadoc - build the javadoc
ant dist - create folders as per a distribution
ant tf.jar - create the testframework jar file
ant tf.javadoc - build the testframework javadoc
Maven

View File

@ -1,4 +1,2 @@
# junit.jar - JUnit 3.2+ Classpath
# junit.jar - JUnit 3.8.1 Classpath
junit.jar=/java/junit/junit.jar
# optional variable, used for creating source distributions
cvs.root=:pserver:anoncvs@cvs.apache.org:/home/cvspublic

814
build.xml
View File

@ -1,459 +1,421 @@
<!-- $Id: build.xml,v 1.57 2004/01/24 16:15:09 scolebourne Exp $ -->
<project name="commons-collections" default="test" basedir=".">
<project name="commons-collections" default="compile" basedir=".">
<!-- patternset describing files to be copied from the doc directory -->
<patternset id="patternset-doc"/>
<!-- ========== Properties ================================================ -->
<!-- patternset describing test classes -->
<patternset id="patternset-test-classes">
<include name="**/AbstractTest*.class"/>
<include name="**/BulkTest*.class"/>
<include name="**/Test*.class"/>
</patternset>
<property file="build.properties"/>
<!-- patternset describing non test classes -->
<patternset id="patternset-non-test-classes">
<include name="**/*.class"/>
<exclude name="**/AbstractTest*.class"/>
<exclude name="**/BulkTest*.class"/>
<exclude name="**/Test*.class"/>
</patternset>
<!-- patternset describing non test source files (*.java, *html, etc.) -->
<patternset id="patternset-javadocable-sources">
<include name="**/*"/>
<exclude name="**/AbstractTest*.java"/>
<exclude name="**/BulkTest*.java"/>
<exclude name="**/Test*.java"/>
</patternset>
<!-- ========== Component Declarations ==================================== -->
<!-- patternset describing test framework classes -->
<patternset id="patternset-testframework-classes">
<include name="**/AbstractTest*.class"/>
<include name="**/BulkTest*.class"/>
</patternset>
<!-- The name of this component -->
<property name="component.name" value="commons-collections"/>
<!-- patternset describing test framework classes -->
<patternset id="patternset-testframework-source">
<include name="**/AbstractTest*.java"/>
<include name="**/BulkTest*.java"/>
</patternset>
<!-- The primary package name of this component -->
<property name="component.package" value="org.apache.commons.collections"/>
<!-- patternset describing test framework source not dependent on collections jar -->
<patternset id="patternset-testframework-validate">
<include name="**/AbstractTestObject.java"/>
<include name="**/AbstractTestCollection.java"/>
<include name="**/AbstractTestSet.java"/>
<include name="**/AbstractTestSortedSet.java"/>
<include name="**/AbstractTestList.java"/>
<include name="**/AbstractTestMap.java"/>
<include name="**/AbstractTestSortedMap.java"/>
<include name="**/AbstractTestComparator.java"/>
<include name="**/AbstractTestIterator.java"/>
<include name="**/AbstractTestListIterator.java"/>
<include name="**/AbstractTestMapEntry.java"/>
<include name="**/BulkTest.java"/>
</patternset>
<!-- The short title of this component -->
<property name="component.title" value="Commons Collections"/>
<patternset id="patternset-exclude-distros">
<exclude name="**/*.gz"/>
<exclude name="**/*.zip"/>
<exclude name="**/classes/**"/>
<exclude name="**/classestestframework/**"/>
</patternset>
<!-- ######################################################### -->
<!-- The full title of this component -->
<property name="component.title.full" value="Apache Jakarta Commons Collections"/>
<target name="init">
<tstamp>
<format property="year" pattern="yyyy"/>
</tstamp>
<!-- The current version number of this component -->
<property name="component.version" value="3.0"/>
<!-- read properties from the build.properties, if any -->
<property name="component-propfile" value="${basedir}/build.properties"/>
<property file="${component-propfile}"/>
<!-- The base directory for component configuration files -->
<property name="source.conf" value="src/conf"/>
<!-- read properties from the commons build.properties, if any -->
<property name="commons-propfile" value="${basedir}/../build.properties"/>
<property file="${commons-propfile}"/>
<!-- The base directory for component sources -->
<property name="source.java" value="src/java"/>
<!-- read properties from the ${user.home}/propfile, if any -->
<property name="user-propfile" value="${user.home}/build.properties"/>
<property file="${user-propfile}"/>
<!-- The base directory for unit test sources -->
<property name="source.test" value="src/test"/>
<!-- command line classpath, if any -->
<property name="cp" value=""/>
<!-- The directories for compilation targets -->
<property name="build.home" value="build"/>
<property name="build.conf" value="${build.home}/conf"/>
<property name="build.classes" value="${build.home}/classes"/>
<property name="build.tests" value="${build.home}/tests"/>
<property name="build.docs" value="${build.home}/docs/apidocs"/>
<!-- The name/location of the jar file to build -->
<property name="jar.name" value="${component.name}-${component.version}.jar"/>
<property name="build.jar.name" value="${build.home}/${jar.name}"/>
<!-- The name/location of the zip files to build -->
<property name="build.dist.bin" value="${build.home}/bin"/>
<property name="build.dist.bin.work" value="${build.dist.bin}/${component.name}-${component.version}"/>
<property name="build.dist.src" value="${build.home}/src"/>
<property name="build.dist.src.work" value="${build.dist.src}/${component.name}-${component.version}"/>
<property name="build.dist" value="${build.home}/dist"/>
<property name="build.bin.tar.name" value="${build.dist}/${component.name}-${component.version}.tar"/>
<property name="build.bin.gz.name" value="${build.dist}/${component.name}-${component.version}.tar.gz"/>
<property name="build.bin.zip.name" value="${build.dist}/${component.name}-${component.version}.zip"/>
<property name="build.src.tar.name" value="${build.dist}/${component.name}-${component.version}-src.tar"/>
<property name="build.src.gz.name" value="${build.dist}/${component.name}-${component.version}-src.tar.gz"/>
<property name="build.src.zip.name" value="${build.dist}/${component.name}-${component.version}-src.zip"/>
<!-- now combine the classpaths -->
<property name="classpath" value="${cp}:${junit.jar}"/>
<property name="name" value="commons-collections"/>
<property name="Name" value="Commons-Collections"/>
<property name="Name-Long" value="Apache Jakarta Commons Collections"/>
<!-- ========== Settings ================================================== -->
<!-- The current version number of this component -->
<property name="component.version" value="3.0"/>
<property name="doc.release.notes" value="RELEASE-NOTES.html"/>
<property name="doc.status" value="STATUS.html"/>
<!-- Javac -->
<property name="compile.debug" value="true"/>
<property name="compile.deprecation" value="true"/>
<property name="compile.optimize" value="false"/>
<property name="test.entry" value="org.apache.commons.collections.TestAllPackages"/>
<property name="test.failonerror" value="true" />
<property name="test.runner" value="junit.textui.TestRunner" />
<!-- Javadoc -->
<property name="javadoc.access" value="protected"/>
<property name="javadoc.links" value="http://java.sun.com/j2se/1.3/docs/api/"/>
<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.classes.testframework" value="${dest}/classestestframework"/>
<property name="dest.doc" value="${dest}/docs"/>
<property name="dest.doc.api" value="${dest.doc}/api"/>
<property name="dest.doc.testframework" value="${dest.doc}/testframework"/>
<property name="dest.jardir" value="${dest}"/>
<property name="dest.jardir.jar" value="${dest.jardir}/${name}.jar"/>
<property name="dest.jardir.testframework.jar" value="${dest.jardir}/${name}-testframework.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"/>
<!-- JUnit -->
<property name="test.failonerror" value="true"/>
<property name="javac.debug" value="true"/>
<property name="javac.deprecation" value="true"/>
<property name="javac.optimize" value="true"/>
<!-- set the cvs.root property in the build.properties file -->
<property name="cvs.tag" value="COLLECTIONS_3_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? -->
<!-- ====================================================================== -->
<!-- ========== Executable Targets ======================================== -->
<!-- ====================================================================== -->
</target>
<target name="clean"
description="Clean build and distribution directories">
<delete dir="${build.home}"/>
</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="init"
description="Initialize and evaluate conditionals">
<echo message="-------- ${component.name} ${component.version} --------"/>
</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="prepare" depends="init"
description="Prepare build directory">
<mkdir dir="${build.home}"/>
</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="compile" depends="prepare"
description="Compile main code">
<mkdir dir="${build.classes}"/>
<javac srcdir="${source.java}"
destdir="${build.classes}"
debug="${compile.debug}"
deprecation="${compile.deprecation}"
optimize="${compile.optimize}">
</javac>
</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,doc-javadoc-testframework"
description="generates javadocs and other documentation">
</target>
<target name="doc-top" depends="init">
<mkdir dir="${dest}"/>
<copy todir="${dest}" file="./LICENSE.txt"/>
<copy todir="${dest}" file="${doc.status}"/>
<copy todir="${dest}" file="${doc.release.notes}"/>
</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}"/>
<javadoc packagenames="org.*"
sourcepath="${workdir}"
destdir="${dest.doc.api}"
windowtitle="${Name-Long}"
doctitle="${Name-Long}"
bottom="&lt;small&gt;Copyright &amp;copy; 2001-${year} Apache Software Foundation. Documenation generated ${TODAY}&lt;/small&gt;."
protected="true"
version="true"
author="true"
overview="${source.src.java}/org/apache/commons/collections/overview.html"
splitindex="false"
nodeprecated="true"
nodeprecatedlist="true"
notree="true"
noindex="false"
nohelp="true"
nonavbar="false"
serialwarn="false">
<link href="http://java.sun.com/j2se/1.3/docs/api/"/>
</javadoc>
<delete dir="${workdir}"/>
</target>
<target name="doc-javadoc-testframework" depends="init" if="available-src-test">
<!-- copy all the relevant sources out to the work directory and javadoc that -->
<mkdir dir="${workdir}"/>
<copy todir="${workdir}">
<fileset dir="${source.src}/test">
<patternset refid="patternset-testframework-source"/>
</fileset>
</copy>
<mkdir dir="${dest.doc.testframework}"/>
<javadoc packagenames="org.*"
sourcepath="${workdir}"
destdir="${dest.doc.testframework}"
windowtitle="Apache Jakarta Commons Collections Test Framework"
doctitle="Apache Jakarta Commons Collections Test Framework"
bottom="&lt;small&gt;Copyright &amp;copy; 2001-${year} Apache Software Foundation. Documenation generated ${TODAY}&lt;/small&gt;."
version="true"
author="true"
overview="${source.src.test}/org/apache/commons/collections/overview.html"
splitindex="false"
nodeprecated="true"
nodeprecatedlist="true"
notree="true"
noindex="true"
nohelp="true"
nonavbar="false"
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}"
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}"
debug="${javac.debug}"
deprecation="false"
optimize="${javac.optimize}"/>
</target>
<!-- validation build to ensure that testframework is independent -->
<target name="validate-build-testframework" depends="init" if="available-src-test">
<delete dir="${dest.classes.testframework}"/>
<mkdir dir="${dest.classes.testframework}"/>
<copy todir="${dest.classes.testframework}">
<fileset dir="${source.src}">
<patternset refid="patternset-testframework-validate"/>
</fileset>
</copy>
<javac destdir="${dest.classes.testframework}"
srcdir="${dest.classes.testframework}"
classpath="${classpath}"
debug="${javac.debug}"
deprecation="${javac.deprecation}"
optimize="${javac.optimize}"/>
</target>
<!-- ######################################################### -->
<target name="test" depends="build-test" if="test.entry" description="runs (junit) unit tests">
<!--
<junit printsummary="yes" fork="on" haltonfailure="yes">
<formatter type="plain" usefile="false"/>
<test name="${test.entry}"/>
<classpath>
<pathelement location="${dest.classes}" />
<pathelement path="${classpath}" />
<pathelement path="${java.class.path}" />
</classpath>
</junit>
-->
<java classname="${test.runner}" fork="yes" failonerror="${test.failonerror}">
<arg value="${test.entry}"/>
<classpath>
<pathelement location="${dest.classes}" />
<pathelement path="${classpath}" />
<pathelement path="${java.class.path}" />
</classpath>
</java>
</target>
<!-- ######################################################### -->
<target name="dist" depends="test,dist-jar,doc,dist-tar,dist-zip" description="builds binary distribution"/>
<target name="dist-jar" depends="dist-jar-main,dist-jar-testframework"/>
<target name="dist-jar-main" 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}"/>
</jar>
<delete dir="${workdir}"/>
</target>
<target name="dist-jar-testframework" depends="validate-build-testframework, build-test">
<mkdir dir="${dest.jardir}"/>
<mkdir dir="${workdir}"/>
<copy todir="${workdir}">
<fileset dir="${dest.classes}">
<patternset refid="patternset-testframework-classes"/>
</fileset>
</copy>
<mkdir dir="${workdir}/META-INF"/>
<copy todir="${workdir}/META-INF" file="./LICENSE.txt"/>
<jar jarfile="${dest.jardir.testframework.jar}" manifest="${source.src}/conf/MANIFEST.MF">
<fileset dir="${workdir}"/>
</jar>
<delete dir="${workdir}"/>
</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>
<!-- ######################################################### -->
<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/collections"/>
</move>
<delete dir="${workdir}/jakarta-commons"/>
<copy file="./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>
<target name="jar" depends="compile"
description="Create jar">
<mkdir dir="${build.classes}/META-INF"/>
<copy file="LICENSE.txt"
tofile="${build.classes}/META-INF/LICENSE.txt"/>
<delete dir="${workdir}"/>
<tstamp/>
<mkdir dir="${build.conf}"/>
<copy todir="${build.conf}" filtering="on">
<filterset>
<filter token="name" value="${component.name}"/>
<filter token="title" value="${component.title}"/>
<filter token="package" value="${component.package}"/>
<filter token="version" value="${component.version}"/>
</filterset>
<fileset dir="${source.conf}" includes="*.MF"/>
</copy>
<!-- NOTE: A jar built using JDK1.4 is incompatible with JDK1.2 -->
<jar jarfile="${build.jar.name}"
basedir="${build.classes}"
manifest="${build.conf}/MANIFEST.MF"/>
</target>
<!-- ====================================================================== -->
<target name="compile.tests" depends="compile"
description="Compile unit test cases">
<mkdir dir="${build.tests}"/>
<javac srcdir="${source.test}"
destdir="${build.tests}"
debug="true"
deprecation="false"
optimize="false">
<classpath>
<pathelement location="${build.classes}"/>
<pathelement location="${junit.jar}"/>
</classpath>
</javac>
</target>
<!-- ====================================================================== -->
<target name="test" depends="compile.tests"
description="Run all unit test cases">
<junit printsummary="yes" haltonfailure="yes">
<classpath>
<pathelement location="${build.classes}"/>
<pathelement location="${build.tests}"/>
<pathelement location="${junit.jar}"/>
</classpath>
<batchtest fork="yes">
<fileset dir="${source.test}">
<include name="**/TestAllPackages.java"/>
</fileset>
</batchtest>
</junit>
</target>
<!-- ====================================================================== -->
<target name="testjar" depends="compile.tests,jar"
description="Run all unit test cases">
<echo message="Running collections tests against built jar ..."/>
<junit printsummary="yes" haltonfailure="yes">
<classpath>
<pathelement location="${build.jar.name}"/>
<pathelement location="${build.tests}"/>
<pathelement location="${junit.jar}"/>
</classpath>
<batchtest fork="yes">
<fileset dir="${source.test}">
<include name="**/TestAllPackages.java"/>
</fileset>
</batchtest>
</junit>
</target>
<!-- ====================================================================== -->
<target name="javadoc" depends="prepare"
description="Create component Javadoc documentation">
<tstamp><format property="year" pattern="yyyy"/></tstamp>
<delete dir="${build.docs}"/>
<mkdir dir="${build.docs}"/>
<javadoc sourcepath="${source.java}"
destdir="${build.docs}"
packagenames="${component.package}.*"
access="${javadoc.access}"
author="true"
version="true"
use="true"
link="${javadoc.links}"
overview="${source.java}/org/apache/commons/collections/overview.html"
doctitle="${component.title} ${component.version} API;"
windowtitle="${component.title} ${component.version} API"
bottom="Copyright &amp;copy; 2001-${year} Apache Software Foundation. All Rights Reserved.">
</javadoc>
</target>
<!-- ====================================================================== -->
<!-- ========== Test framework ============================================ -->
<!-- ====================================================================== -->
</target>
<property name="tf.name" value="commons-collections-testframework"/>
<property name="tf.package" value="org.apache.commons.collections"/>
<property name="tf.title" value="Commons Collections Test Framework"/>
<property name="tf.title.full" value="Apache Jakarta Commons Collections Test Framework"/>
<property name="tf.version" value="${component.version}"/>
<property name="tf.build.conf" value="${build.home}/tfconf"/>
<property name="tf.build.tf" value="${build.home}/testframework"/>
<property name="tf.build.docs" value="${build.home}/docs/testframework"/>
<property name="tf.jar.name" value="${tf.name}-${tf.version}.jar"/>
<property name="tf.build.jar.name" value="${build.home}/${tf.jar.name}"/>
<!-- ====================================================================== -->
<!-- patternset describing test framework source not dependent on collections jar -->
<patternset id="tf.patternset.validate">
<include name="**/AbstractTestObject.java"/>
<include name="**/AbstractTestCollection.java"/>
<include name="**/AbstractTestSet.java"/>
<include name="**/AbstractTestSortedSet.java"/>
<include name="**/AbstractTestList.java"/>
<include name="**/AbstractTestMap.java"/>
<include name="**/AbstractTestSortedMap.java"/>
<include name="**/AbstractTestComparator.java"/>
<include name="**/AbstractTestIterator.java"/>
<include name="**/AbstractTestListIterator.java"/>
<include name="**/AbstractTestMapEntry.java"/>
<include name="**/BulkTest.java"/>
</patternset>
<target name="tf.validate" depends="prepare"
description="Testframework - Validate testframework independence">
<delete dir="${tf.build.tf}"/>
<mkdir dir="${tf.build.tf}"/>
<javac srcdir="${source.test}"
destdir="${tf.build.tf}"
debug="true"
deprecation="false"
optimize="false">
<patternset refid="tf.patternset.validate" />
<classpath>
<pathelement location="${junit.jar}"/>
</classpath>
</javac>
<delete dir="${tf.build.tf}"/>
</target>
<!-- ====================================================================== -->
<target name="tf.jar" depends="compile.tests"
description="Testframework - Create jar">
<mkdir dir="${tf.build.tf}"/>
<copy todir="${tf.build.tf}">
<fileset dir="${build.tests}">
<include name="**/AbstractTest*.class"/>
<include name="**/BulkTest*.class"/>
</fileset>
</copy>
<mkdir dir="${tf.build.tf}/META-INF"/>
<copy file="LICENSE.txt"
tofile="${tf.build.tf}/META-INF/LICENSE.txt"/>
<tstamp/>
<mkdir dir="${tf.build.conf}"/>
<copy todir="${tf.build.conf}" filtering="on">
<filterset>
<filter token="name" value="${tf.name}"/>
<filter token="title" value="${tf.title}"/>
<filter token="package" value="${tf.package}"/>
<filter token="version" value="${tf.version}"/>
</filterset>
<fileset dir="${source.conf}" includes="*.MF"/>
</copy>
<!-- NOTE: A jar built using JDK1.4 is incompatible with JDK1.2 -->
<jar jarfile="${tf.build.jar.name}"
basedir="${tf.build.tf}"
manifest="${tf.build.conf}/MANIFEST.MF"/>
</target>
<!-- ====================================================================== -->
<target name="tf.javadoc" depends="prepare"
description="Testframework - Create Javadoc documentation">
<tstamp><format property="year" pattern="yyyy"/></tstamp>
<delete dir="${tf.build.docs}"/>
<mkdir dir="${tf.build.docs}"/>
<javadoc destdir="${tf.build.docs}"
access="protected"
author="false"
version="false"
link="${javadoc.links}"
overview="${source.test}/org/apache/commons/collections/overview.html"
doctitle="${tf.title} ${tf.version} API;"
windowtitle="${tf.title} ${tf.version} API"
bottom="Copyright &amp;copy; 2001-${year} Apache Software Foundation. All Rights Reserved.">
<fileset dir="${source.test}">
<include name="**/AbstractTest*.java"/>
<include name="**/BulkTest*.java"/>
</fileset>
</javadoc>
</target>
<!-- ====================================================================== -->
<!-- ========== Distributions ============================================= -->
<!-- ====================================================================== -->
<!-- ====================================================================== -->
<target name="dist" depends="jar,testjar,javadoc,tf.validate,tf.jar,dist.bin,dist.src"
description="Create distribution folders">
</target>
<target name="dist.bin">
<mkdir dir="${build.dist.bin.work}"/>
<copy todir="${build.dist.bin.work}">
<fileset dir=".">
<include name="LICENSE.txt"/>
<include name="README.txt"/>
<include name="RELEASE-NOTES.html"/>
</fileset>
</copy>
<copy todir="${build.dist.bin.work}">
<fileset dir="${build.home}">
<include name="*.jar"/>
<include name="docs/**"/>
</fileset>
</copy>
</target>
<target name="dist.src">
<mkdir dir="${build.dist.src.work}"/>
<copy todir="${build.dist.src.work}">
<fileset dir=".">
<include name="LICENSE.txt"/>
<include name="README.txt"/>
<include name="RELEASE-NOTES.html"/>
<include name="DEVELOPERS-GUIDE.html"/>
<include name="PROPOSAL.html"/>
<include name="STATUS.html"/>
<include name="build.properties.sample"/>
<include name="build.xml"/>
<include name="maven.xml"/>
<include name="project.xml"/>
<include name="project.properties"/>
</fileset>
</copy>
<copy todir="${build.dist.src.work}">
<fileset dir="${build.home}">
<include name="*.jar"/>
</fileset>
</copy>
<copy todir="${build.dist.src.work}">
<fileset dir=".">
<include name="data/**"/>
<include name="src/**"/>
<include name="xdocs/**"/>
</fileset>
</copy>
</target>
<!-- ====================================================================== -->
<target name="zip" depends="zip.bin,zip.src"
description="Create zipped distribution">
</target>
<target name="zip.bin">
<mkdir dir="${build.dist}"/>
<tar longfile="gnu" tarfile="${build.bin.tar.name}">
<tarfileset dir="${build.dist.bin}"/>
</tar>
<gzip zipfile="${build.bin.gz.name}" src="${build.bin.tar.name}"/>
<delete file="${build.bin.tar.name}" />
<zip zipfile="${build.bin.zip.name}" >
<zipfileset dir="${build.dist.bin}"/>
</zip>
<checksum file="${build.bin.gz.name}"/>
<checksum file="${build.bin.zip.name}"/>
</target>
<target name="zip.src">
<mkdir dir="${build.dist}"/>
<tar longfile="gnu" tarfile="${build.src.tar.name}">
<tarfileset dir="${build.dist.src}"/>
</tar>
<gzip zipfile="${build.src.gz.name}" src="${build.src.tar.name}"/>
<delete file="${build.src.tar.name}" />
<zip zipfile="${build.src.zip.name}" >
<zipfileset dir="${build.dist.src}"/>
</zip>
<checksum file="${build.src.gz.name}"/>
<checksum file="${build.src.zip.name}"/>
</target>
</project>

View File

@ -1,10 +1,10 @@
Manifest-Version: 1.0
Package: org.apache.commons.collections.*
Extension-Name: commons-collections
Specification-Version: 3.0
Package: @package@
Extension-Name: @name@
Specification-Version: @version@
Specification-Vendor: Apache Software Foundation
Specification-Title: Commons Collections
Implementation-Version: 3.0
Specification-Title: @title@
Implementation-Version: @version@
Implementation-Vendor: Apache Software Foundation
Implementation-Vendor-Id: