2004-02-19 16:41:04 -05:00
|
|
|
<!--
|
2006-11-29 02:41:17 -05:00
|
|
|
Licensed to the Apache Software Foundation (ASF) under one or more
|
|
|
|
contributor license agreements. See the NOTICE file distributed with
|
|
|
|
this work for additional information regarding copyright ownership.
|
|
|
|
The ASF licenses this file to You under the Apache License, Version 2.0
|
|
|
|
(the "License"); you may not use this file except in compliance with
|
|
|
|
the License. You may obtain a copy of the License at
|
2004-02-19 16:41:04 -05:00
|
|
|
|
|
|
|
http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
|
|
|
|
Unless required by applicable law or agreed to in writing, software
|
|
|
|
distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
See the License for the specific language governing permissions and
|
|
|
|
limitations under the License.
|
|
|
|
-->
|
2004-01-24 20:23:04 -05:00
|
|
|
<project name="commons-collections" default="compile" basedir=".">
|
2003-01-06 07:54:05 -05:00
|
|
|
|
2004-01-24 20:23:04 -05:00
|
|
|
<!-- ========== Properties ================================================ -->
|
2003-01-06 07:54:05 -05:00
|
|
|
|
2005-11-13 10:14:06 -05:00
|
|
|
<!-- This can be used to define 'junit.jar' property if necessary -->
|
2004-01-24 20:23:04 -05:00
|
|
|
<property file="build.properties"/>
|
|
|
|
|
|
|
|
<!-- ========== Component Declarations ==================================== -->
|
|
|
|
|
|
|
|
<!-- The name of this component -->
|
|
|
|
<property name="component.name" value="commons-collections"/>
|
|
|
|
|
|
|
|
<!-- The primary package name of this component -->
|
|
|
|
<property name="component.package" value="org.apache.commons.collections"/>
|
|
|
|
|
|
|
|
<!-- The short title of this component -->
|
|
|
|
<property name="component.title" value="Commons Collections"/>
|
|
|
|
|
|
|
|
<!-- The full title of this component -->
|
2007-07-31 16:34:50 -04:00
|
|
|
<property name="component.title.full" value="Apache Commons Collections"/>
|
2004-01-24 20:23:04 -05:00
|
|
|
|
|
|
|
<!-- The current version number of this component -->
|
2009-05-21 00:56:35 -04:00
|
|
|
<property name="component.version" value="3.3"/>
|
2004-01-24 20:23:04 -05:00
|
|
|
|
|
|
|
<!-- The base directory for component configuration files -->
|
|
|
|
<property name="source.conf" value="src/conf"/>
|
|
|
|
|
|
|
|
<!-- The base directory for component sources -->
|
|
|
|
<property name="source.java" value="src/java"/>
|
|
|
|
|
|
|
|
<!-- The base directory for unit test sources -->
|
|
|
|
<property name="source.test" value="src/test"/>
|
|
|
|
|
|
|
|
<!-- 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"/>
|
2008-04-10 11:36:18 -04:00
|
|
|
<property name="build.test.reports" value="${build.home}/test-reports"/>
|
2004-01-24 20:23:04 -05:00
|
|
|
<property name="build.docs" value="${build.home}/docs/apidocs"/>
|
2006-05-06 10:06:19 -04:00
|
|
|
<property name="build.src" value="${build.home}/src-ide" />
|
2004-01-24 20:23:04 -05:00
|
|
|
|
|
|
|
<!-- The name/location of the jar file to build -->
|
2006-05-06 10:06:19 -04:00
|
|
|
<property name="final.name" value="${component.name}-${component.version}"/>
|
|
|
|
<property name="jar.name" value="${final.name}.jar"/>
|
2004-01-24 20:23:04 -05:00
|
|
|
<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"/>
|
2005-11-13 10:14:06 -05:00
|
|
|
<property name="build.dist.src.work" value="${build.dist.src}/${component.name}-${component.version}-src"/>
|
2004-01-24 20:23:04 -05:00
|
|
|
<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"/>
|
2005-02-13 06:28:49 -05:00
|
|
|
<property name="dist.home" value="dist"/> <!-- for nightly builds -->
|
2004-01-24 20:23:04 -05:00
|
|
|
|
|
|
|
|
|
|
|
<!-- ========== Settings ================================================== -->
|
|
|
|
|
|
|
|
<!-- Javac -->
|
|
|
|
<property name="compile.debug" value="true"/>
|
|
|
|
<property name="compile.deprecation" value="true"/>
|
|
|
|
<property name="compile.optimize" value="false"/>
|
|
|
|
|
|
|
|
<!-- Javadoc -->
|
|
|
|
<property name="javadoc.access" value="protected"/>
|
|
|
|
<property name="javadoc.links" value="http://java.sun.com/j2se/1.3/docs/api/"/>
|
|
|
|
|
|
|
|
<!-- JUnit -->
|
|
|
|
<property name="test.failonerror" value="true"/>
|
2009-01-23 15:28:36 -05:00
|
|
|
<property name="test.fork" value="true"/>
|
2004-01-24 20:23:04 -05:00
|
|
|
|
2006-05-06 10:06:19 -04:00
|
|
|
<!-- Maven -->
|
|
|
|
<property name="maven.repo" value="${user.home}/.maven/repository" />
|
|
|
|
|
2004-01-24 20:23:04 -05:00
|
|
|
|
|
|
|
<!-- ====================================================================== -->
|
|
|
|
<!-- ========== Executable Targets ======================================== -->
|
|
|
|
<!-- ====================================================================== -->
|
|
|
|
|
|
|
|
<target name="clean"
|
|
|
|
description="Clean build and distribution directories">
|
|
|
|
<delete dir="${build.home}"/>
|
|
|
|
</target>
|
|
|
|
|
|
|
|
<!-- ====================================================================== -->
|
|
|
|
|
|
|
|
<target name="init"
|
|
|
|
description="Initialize and evaluate conditionals">
|
|
|
|
<echo message="-------- ${component.name} ${component.version} --------"/>
|
|
|
|
</target>
|
|
|
|
|
|
|
|
<!-- ====================================================================== -->
|
|
|
|
|
|
|
|
<target name="prepare" depends="init"
|
|
|
|
description="Prepare build directory">
|
|
|
|
<mkdir dir="${build.home}"/>
|
|
|
|
</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="jar" depends="compile"
|
|
|
|
description="Create jar">
|
|
|
|
<mkdir dir="${build.classes}/META-INF"/>
|
|
|
|
<copy file="LICENSE.txt"
|
|
|
|
tofile="${build.classes}/META-INF/LICENSE.txt"/>
|
2004-02-19 16:27:52 -05:00
|
|
|
<copy file="NOTICE.txt"
|
|
|
|
tofile="${build.classes}/META-INF/NOTICE.txt"/>
|
2004-01-24 20:23:04 -05:00
|
|
|
|
|
|
|
<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>
|
|
|
|
|
2004-05-03 17:04:46 -04:00
|
|
|
<!-- ====================================================================== -->
|
|
|
|
<!-- Targets you might use to get smaller jar files - not recommended -->
|
|
|
|
|
|
|
|
<target name="splitjar" depends="jar"
|
|
|
|
description="Create split jar">
|
|
|
|
<jar jarfile="${build.home}/${component.name}-bag-${component.version}.jar"
|
|
|
|
basedir="${build.classes}"
|
|
|
|
manifest="${build.conf}/MANIFEST.MF">
|
|
|
|
<include name="**/META-INF/*"/>
|
|
|
|
<include name="**/BagUtils*.class"/>
|
|
|
|
<include name="**/bag/*.class"/>
|
|
|
|
</jar>
|
|
|
|
<jar jarfile="${build.home}/${component.name}-bidimap-${component.version}.jar"
|
|
|
|
basedir="${build.classes}"
|
|
|
|
manifest="${build.conf}/MANIFEST.MF">
|
|
|
|
<include name="**/META-INF/*"/>
|
|
|
|
<include name="**/bidimap/*.class"/>
|
|
|
|
</jar>
|
|
|
|
<jar jarfile="${build.home}/${component.name}-buffer-${component.version}.jar"
|
|
|
|
basedir="${build.classes}"
|
|
|
|
manifest="${build.conf}/MANIFEST.MF">
|
|
|
|
<include name="**/META-INF/*"/>
|
|
|
|
<include name="**/BufferUtils*.class"/>
|
|
|
|
<include name="**/buffer/*.class"/>
|
|
|
|
</jar>
|
|
|
|
<jar jarfile="${build.home}/${component.name}-functors-${component.version}.jar"
|
|
|
|
basedir="${build.classes}"
|
|
|
|
manifest="${build.conf}/MANIFEST.MF">
|
|
|
|
<include name="**/META-INF/*"/>
|
|
|
|
<include name="**/ClosureUtils*.class"/>
|
|
|
|
<include name="**/FactoryUtils*.class"/>
|
|
|
|
<include name="**/PredicateUtils*.class"/>
|
|
|
|
<include name="**/TransformerUtils*.class"/>
|
|
|
|
<include name="**/functors/*.class"/>
|
|
|
|
</jar>
|
2006-02-07 17:41:53 -05:00
|
|
|
<jar jarfile="${build.home}/${component.name}-core-${component.version}.jar"
|
2004-05-03 17:04:46 -04:00
|
|
|
basedir="${build.classes}"
|
|
|
|
manifest="${build.conf}/MANIFEST.MF">
|
|
|
|
<include name="**/META-INF/*"/>
|
|
|
|
<include name="**/*"/>
|
|
|
|
<exclude name="**/BagUtils*.class"/>
|
|
|
|
<exclude name="**/BufferUtils*.class"/>
|
|
|
|
<exclude name="**/ClosureUtils*.class"/>
|
|
|
|
<exclude name="**/FactoryUtils*.class"/>
|
|
|
|
<exclude name="**/PredicateUtils*.class"/>
|
|
|
|
<exclude name="**/TransformerUtils*.class"/>
|
|
|
|
<exclude name="**/bag/*.class"/>
|
|
|
|
<exclude name="**/bidimap/*.class"/>
|
|
|
|
<exclude name="**/buffer/*.class"/>
|
|
|
|
<exclude name="**/functors/*.class"/>
|
|
|
|
<exclude name="**/iterators/ProxyIterator*.class"/>
|
|
|
|
<exclude name="**/iterators/ProxyListIterator*.class"/>
|
2006-02-07 17:41:53 -05:00
|
|
|
<exclude name="**/map/*.class"/>
|
|
|
|
<exclude name="org/apache/commons/collections/BeanMap*.class"/>
|
2004-05-03 17:04:46 -04:00
|
|
|
<exclude name="org/apache/commons/collections/BinaryHeap*.class"/>
|
|
|
|
<exclude name="org/apache/commons/collections/BoundedFifoBuffer*.class"/>
|
|
|
|
<exclude name="org/apache/commons/collections/CursorableLinkedList*.class"/>
|
|
|
|
<exclude name="org/apache/commons/collections/CursorableSubList*.class"/>
|
|
|
|
<exclude name="org/apache/commons/collections/DefaultMapBag*.class"/>
|
|
|
|
<exclude name="org/apache/commons/collections/DefaultMapEntry*.class"/>
|
|
|
|
<exclude name="org/apache/commons/collections/DoubleOrderedMap*.class"/>
|
|
|
|
<exclude name="org/apache/commons/collections/HashBag*.class"/>
|
|
|
|
<exclude name="org/apache/commons/collections/LRUMap*.class"/>
|
2006-02-07 17:41:53 -05:00
|
|
|
<exclude name="org/apache/commons/collections/MultiHashMap*.class"/>
|
2004-05-03 17:04:46 -04:00
|
|
|
<exclude name="org/apache/commons/collections/PriorityQueue*.class"/>
|
|
|
|
<exclude name="org/apache/commons/collections/ProxyMap*.class"/>
|
|
|
|
<exclude name="org/apache/commons/collections/ReferenceMap*.class"/>
|
|
|
|
<exclude name="org/apache/commons/collections/SequencedHashMap*.class"/>
|
|
|
|
<exclude name="org/apache/commons/collections/StaticBucketMap*.class"/>
|
|
|
|
<exclude name="org/apache/commons/collections/SynchronizedPriorityQueue*.class"/>
|
|
|
|
<exclude name="org/apache/commons/collections/TreeBag*.class"/>
|
|
|
|
<exclude name="org/apache/commons/collections/UnboundedFifoBuffer*.class"/>
|
|
|
|
</jar>
|
|
|
|
<jar jarfile="${build.home}/${component.name}-deprecated-${component.version}.jar"
|
|
|
|
basedir="${build.classes}"
|
|
|
|
manifest="${build.conf}/MANIFEST.MF">
|
|
|
|
<include name="**/META-INF/*"/>
|
|
|
|
<include name="**/iterators/ProxyIterator*.class"/>
|
|
|
|
<include name="**/iterators/ProxyListIterator*.class"/>
|
2006-02-07 17:41:53 -05:00
|
|
|
<include name="org/apache/commons/collections/BeanMap*.class"/>
|
2004-05-03 17:04:46 -04:00
|
|
|
<include name="org/apache/commons/collections/BinaryHeap*.class"/>
|
|
|
|
<include name="org/apache/commons/collections/BoundedFifoBuffer*.class"/>
|
|
|
|
<include name="org/apache/commons/collections/CursorableLinkedList*.class"/>
|
|
|
|
<include name="org/apache/commons/collections/CursorableSubList*.class"/>
|
|
|
|
<include name="org/apache/commons/collections/DefaultMapBag*.class"/>
|
|
|
|
<include name="org/apache/commons/collections/DefaultMapEntry*.class"/>
|
|
|
|
<include name="org/apache/commons/collections/DoubleOrderedMap*.class"/>
|
|
|
|
<include name="org/apache/commons/collections/HashBag*.class"/>
|
|
|
|
<include name="org/apache/commons/collections/LRUMap*.class"/>
|
2006-02-07 17:41:53 -05:00
|
|
|
<include name="org/apache/commons/collections/MultiHashMap*.class"/>
|
2004-05-03 17:04:46 -04:00
|
|
|
<include name="org/apache/commons/collections/PriorityQueue*.class"/>
|
|
|
|
<include name="org/apache/commons/collections/ProxyMap*.class"/>
|
|
|
|
<include name="org/apache/commons/collections/ReferenceMap*.class"/>
|
|
|
|
<include name="org/apache/commons/collections/SequencedHashMap*.class"/>
|
|
|
|
<include name="org/apache/commons/collections/StaticBucketMap*.class"/>
|
|
|
|
<include name="org/apache/commons/collections/SynchronizedPriorityQueue*.class"/>
|
|
|
|
<include name="org/apache/commons/collections/TreeBag*.class"/>
|
|
|
|
<include name="org/apache/commons/collections/UnboundedFifoBuffer*.class"/>
|
|
|
|
</jar>
|
|
|
|
|
2004-05-04 13:46:51 -04:00
|
|
|
</target>
|
2004-05-03 17:04:46 -04:00
|
|
|
|
2004-01-24 20:23:04 -05:00
|
|
|
<!-- ====================================================================== -->
|
|
|
|
|
|
|
|
<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>
|
|
|
|
|
|
|
|
<!-- ====================================================================== -->
|
|
|
|
|
2006-05-06 10:18:39 -04:00
|
|
|
<!-- Tests collections, either running all or one test -->
|
|
|
|
<target name="test" depends="-test-all,-test-single"
|
|
|
|
description="Run unit tests" />
|
|
|
|
|
|
|
|
<!-- Runs all tests -->
|
|
|
|
<target name="-test-all" depends="compile.tests" unless="testcase">
|
2008-04-10 11:36:18 -04:00
|
|
|
<mkdir dir="${build.test.reports}"/>
|
2004-04-10 18:20:06 -04:00
|
|
|
<junit printsummary="yes" haltonfailure="yes" showoutput="yes">
|
|
|
|
<formatter type="brief" />
|
2004-01-24 20:23:04 -05:00
|
|
|
<classpath>
|
|
|
|
<pathelement location="${build.classes}"/>
|
|
|
|
<pathelement location="${build.tests}"/>
|
|
|
|
<pathelement location="${junit.jar}"/>
|
|
|
|
</classpath>
|
|
|
|
|
2009-01-23 15:28:36 -05:00
|
|
|
<batchtest fork="${test.fork}" todir="${build.test.reports}">
|
2004-01-24 20:23:04 -05:00
|
|
|
<fileset dir="${source.test}">
|
2004-05-01 10:00:41 -04:00
|
|
|
<include name="**/Test*.java"/>
|
2004-04-10 18:20:06 -04:00
|
|
|
<exclude name="**/TestAll*.java"/>
|
2004-05-01 10:00:41 -04:00
|
|
|
<exclude name="**/TestAbstract*"/>
|
2004-04-10 18:20:06 -04:00
|
|
|
<exclude name="**/TestArrayList.java"/>
|
|
|
|
<exclude name="**/TestLinkedList.java"/>
|
|
|
|
<exclude name="**/TestHashMap.java"/>
|
|
|
|
<exclude name="**/TestTreeMap.java"/>
|
|
|
|
<exclude name="**/TestTypedCollection.java"/>
|
2001-08-17 19:00:26 -04:00
|
|
|
</fileset>
|
2004-05-01 10:00:41 -04:00
|
|
|
<formatter type="brief" usefile="false" />
|
2004-01-24 20:23:04 -05:00
|
|
|
</batchtest>
|
|
|
|
</junit>
|
|
|
|
</target>
|
|
|
|
|
2006-05-06 10:18:39 -04:00
|
|
|
<!-- Runs a single test -->
|
|
|
|
<target name="-test-single" depends="compile.tests" if="testcase">
|
|
|
|
<junit printsummary="yes" haltonfailure="yes" showoutput="yes">
|
|
|
|
<formatter type="brief" />
|
|
|
|
<classpath>
|
|
|
|
<pathelement location="${build.classes}"/>
|
|
|
|
<pathelement location="${build.tests}"/>
|
|
|
|
<pathelement location="${junit.jar}"/>
|
|
|
|
</classpath>
|
|
|
|
|
2009-01-23 15:28:36 -05:00
|
|
|
<test name="${testcase}" fork="${test.fork}" todir="${build.test.reports}">
|
2006-05-06 10:18:39 -04:00
|
|
|
<formatter type="brief" usefile="false" />
|
|
|
|
</test>
|
|
|
|
</junit>
|
|
|
|
</target>
|
|
|
|
|
2004-01-24 20:23:04 -05:00
|
|
|
<!-- ====================================================================== -->
|
|
|
|
|
|
|
|
<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>
|
|
|
|
|
2009-01-23 15:28:36 -05:00
|
|
|
<batchtest fork="${test.fork}">
|
2004-01-24 20:23:04 -05:00
|
|
|
<fileset dir="${source.test}">
|
|
|
|
<include name="**/TestAllPackages.java"/>
|
2003-10-05 19:12:15 -04:00
|
|
|
</fileset>
|
2004-05-01 10:00:41 -04:00
|
|
|
<formatter type="brief" usefile="false" />
|
2004-01-24 20:23:04 -05:00
|
|
|
</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 &copy; 2001-${year} Apache Software Foundation. All Rights Reserved.">
|
|
|
|
</javadoc>
|
|
|
|
</target>
|
|
|
|
|
|
|
|
<!-- ====================================================================== -->
|
|
|
|
<!-- ========== Test framework ============================================ -->
|
|
|
|
<!-- ====================================================================== -->
|
2002-03-28 00:13:54 -05:00
|
|
|
|
2004-01-24 20:23:04 -05:00
|
|
|
<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"/>
|
2007-07-31 16:34:50 -04:00
|
|
|
<property name="tf.title.full" value="Apache Commons Collections Test Framework"/>
|
2004-01-24 20:23:04 -05:00
|
|
|
<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>
|
|
|
|
|
|
|
|
<!-- NOTE: A jar built using JDK1.4 is incompatible with JDK1.2 -->
|
2008-03-17 16:51:18 -04:00
|
|
|
<ant antfile="build-testframework.xml" target="jar">
|
|
|
|
<property name="test.classes" value="${tf.build.tf}"/>
|
2008-03-19 16:27:16 -04:00
|
|
|
<property name="dist.home" value="${build.home}"/>
|
2008-03-17 16:51:18 -04:00
|
|
|
<property name="component.version" value="${tf.version}"/>
|
|
|
|
<property name="maven.compile.source" value="1.2"/>
|
|
|
|
<property name="maven.compile.target" value="1.2"/>
|
|
|
|
</ant>
|
|
|
|
|
2004-01-24 20:23:04 -05:00
|
|
|
</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 &copy; 2001-${year} Apache Software Foundation. All Rights Reserved.">
|
|
|
|
<fileset dir="${source.test}">
|
|
|
|
<include name="**/AbstractTest*.java"/>
|
|
|
|
<include name="**/BulkTest*.java"/>
|
|
|
|
</fileset>
|
|
|
|
</javadoc>
|
|
|
|
</target>
|
2001-08-17 19:00:26 -04:00
|
|
|
|
|
|
|
|
2004-01-24 20:23:04 -05:00
|
|
|
<!-- ====================================================================== -->
|
|
|
|
<!-- ========== Distributions ============================================= -->
|
|
|
|
<!-- ====================================================================== -->
|
2002-03-28 01:50:15 -05:00
|
|
|
|
2004-01-24 20:23:04 -05:00
|
|
|
<!-- ====================================================================== -->
|
|
|
|
|
2005-02-13 06:28:49 -05:00
|
|
|
<!-- Target needed for nightly builds -->
|
2006-05-06 10:06:19 -04:00
|
|
|
<target name="dist" depends="javadoc,dist.create"
|
2004-01-24 20:23:04 -05:00
|
|
|
description="Create distribution folders">
|
2005-02-13 06:28:49 -05:00
|
|
|
<delete dir="${dist.home}"/>
|
|
|
|
<mkdir dir="${dist.home}" />
|
|
|
|
<copy todir="${dist.home}">
|
|
|
|
<fileset dir="${build.dist.bin}" />
|
|
|
|
</copy>
|
2004-01-24 20:23:04 -05:00
|
|
|
</target>
|
2005-02-13 06:28:49 -05:00
|
|
|
|
2006-05-06 10:06:19 -04:00
|
|
|
<target name="dist.create" depends="jar,testjar,tf.validate,tf.jar,dist.bin,dist.src">
|
2005-02-13 06:28:49 -05:00
|
|
|
</target>
|
|
|
|
|
2004-01-24 20:23:04 -05:00
|
|
|
<target name="dist.bin">
|
2006-05-06 10:06:19 -04:00
|
|
|
<copy todir="${build.src}">
|
|
|
|
<fileset dir="${basedir}/src/java" includes="**/*.java" />
|
|
|
|
</copy>
|
|
|
|
<copy todir="${build.src}/META-INF">
|
|
|
|
<fileset dir="${basedir}" includes="LICENSE*, NOTICE*" />
|
|
|
|
</copy>
|
|
|
|
<jar jarfile="${build.home}/${final.name}-src-ide.zip" basedir="${build.src}" />
|
|
|
|
<antcall target="internal-md5">
|
|
|
|
<param name="path" value="${build.home}/${final.name}.jar"/>
|
|
|
|
</antcall>
|
|
|
|
|
2004-01-24 20:23:04 -05:00
|
|
|
<mkdir dir="${build.dist.bin.work}"/>
|
|
|
|
<copy todir="${build.dist.bin.work}">
|
|
|
|
<fileset dir=".">
|
|
|
|
<include name="LICENSE.txt"/>
|
2004-02-19 16:27:52 -05:00
|
|
|
<include name="NOTICE.txt"/>
|
2004-01-24 20:23:04 -05:00
|
|
|
<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"/>
|
2004-02-19 16:27:52 -05:00
|
|
|
<include name="NOTICE.txt"/>
|
2004-01-24 20:23:04 -05:00
|
|
|
<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.xml"/>
|
2008-03-19 07:44:27 -04:00
|
|
|
<include name="build-testframework.xml"/>
|
|
|
|
<include name="checkstyle.xml"/>
|
2004-01-24 20:23:04 -05:00
|
|
|
<include name="maven.xml"/>
|
|
|
|
<include name="project.xml"/>
|
|
|
|
<include name="project.properties"/>
|
2008-03-19 07:44:27 -04:00
|
|
|
<include name="pom.xml"/>
|
2004-01-24 20:23:04 -05:00
|
|
|
</fileset>
|
|
|
|
</copy>
|
|
|
|
<copy todir="${build.dist.src.work}">
|
|
|
|
<fileset dir="${build.home}">
|
2006-05-06 10:06:19 -04:00
|
|
|
<include name="${final.name}.jar"/>
|
2004-01-24 20:23:04 -05:00
|
|
|
</fileset>
|
|
|
|
</copy>
|
|
|
|
<copy todir="${build.dist.src.work}">
|
|
|
|
<fileset dir=".">
|
|
|
|
<include name="data/**"/>
|
|
|
|
<include name="src/**"/>
|
|
|
|
<include name="xdocs/**"/>
|
|
|
|
</fileset>
|
|
|
|
</copy>
|
|
|
|
</target>
|
|
|
|
|
|
|
|
<!-- ====================================================================== -->
|
|
|
|
|
2005-02-13 06:28:49 -05:00
|
|
|
<target name="release" depends="dist.create,zip"
|
|
|
|
description="Create release">
|
2006-05-06 10:06:19 -04:00
|
|
|
<!-- POM -->
|
|
|
|
<copy file="project.xml" tofile="${build.home}/${final.name}.pom" />
|
|
|
|
<antcall target="internal-md5">
|
|
|
|
<param name="path" value="${build.home}/${final.name}.pom"/>
|
|
|
|
</antcall>
|
2005-02-13 06:28:49 -05:00
|
|
|
</target>
|
|
|
|
|
|
|
|
<target name="zip" depends="zip.bin,zip.src">
|
2004-01-24 20:23:04 -05:00
|
|
|
</target>
|
|
|
|
|
|
|
|
<target name="zip.bin">
|
|
|
|
<mkdir dir="${build.dist}"/>
|
2005-11-13 10:14:06 -05:00
|
|
|
<fixcrlf srcdir="${build.dist.bin.work}" eol="lf" includes="*.txt" />
|
2004-01-24 20:23:04 -05:00
|
|
|
<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}" />
|
2005-11-13 10:14:06 -05:00
|
|
|
<antcall target="internal-md5">
|
|
|
|
<param name="path" value="${build.bin.gz.name}"/>
|
|
|
|
</antcall>
|
2004-01-24 20:23:04 -05:00
|
|
|
|
2005-11-13 10:14:06 -05:00
|
|
|
<fixcrlf srcdir="${build.dist.bin.work}" eol="crlf" includes="*.txt" />
|
2004-01-24 20:23:04 -05:00
|
|
|
<zip zipfile="${build.bin.zip.name}" >
|
|
|
|
<zipfileset dir="${build.dist.bin}"/>
|
|
|
|
</zip>
|
2005-11-13 10:14:06 -05:00
|
|
|
<antcall target="internal-md5">
|
|
|
|
<param name="path" value="${build.bin.zip.name}"/>
|
|
|
|
</antcall>
|
2004-01-24 20:23:04 -05:00
|
|
|
</target>
|
|
|
|
|
|
|
|
<target name="zip.src">
|
|
|
|
<mkdir dir="${build.dist}"/>
|
2005-11-13 10:14:06 -05:00
|
|
|
<fixcrlf srcdir="${build.dist.src.work}" eol="lf" includes="*.txt,*.properties" />
|
2004-01-24 20:23:04 -05:00
|
|
|
<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}" />
|
2005-11-13 10:14:06 -05:00
|
|
|
<antcall target="internal-md5">
|
|
|
|
<param name="path" value="${build.src.gz.name}"/>
|
|
|
|
</antcall>
|
2004-01-24 20:23:04 -05:00
|
|
|
|
2005-11-13 10:14:06 -05:00
|
|
|
<fixcrlf srcdir="${build.dist.src.work}" eol="crlf" includes="*.txt,*.properties" />
|
2004-01-24 20:23:04 -05:00
|
|
|
<zip zipfile="${build.src.zip.name}" >
|
|
|
|
<zipfileset dir="${build.dist.src}"/>
|
|
|
|
</zip>
|
2005-11-13 10:14:06 -05:00
|
|
|
<antcall target="internal-md5">
|
|
|
|
<param name="path" value="${build.src.zip.name}"/>
|
|
|
|
</antcall>
|
|
|
|
</target>
|
|
|
|
|
|
|
|
<target name="internal-md5">
|
|
|
|
<basename property="_base" file="${path}"/>
|
|
|
|
<checksum file="${path}" property="md5"/>
|
|
|
|
<echo message="${md5} *${_base}" file="${path}.md5"/>
|
2004-01-24 20:23:04 -05:00
|
|
|
</target>
|
2002-03-28 01:50:15 -05:00
|
|
|
|
2005-11-13 10:14:06 -05:00
|
|
|
<!-- ====================================================================== -->
|
2004-06-07 16:28:37 -04:00
|
|
|
<target name="clirr">
|
|
|
|
<taskdef resource="clirrtask.properties">
|
2006-05-06 10:06:19 -04:00
|
|
|
<classpath path="${maven.repo}/clirr/jars/clirr-core-0.6-uber.jar;" />
|
2004-06-07 16:28:37 -04:00
|
|
|
</taskdef>
|
|
|
|
<clirr>
|
2006-05-06 10:06:19 -04:00
|
|
|
<origfiles dir="${maven.repo}/commons-collections/jars" includes="commons-collections-3.1.jar"/>
|
|
|
|
<newfiles dir="${build.home}" includes="${final.name}.jar" />
|
|
|
|
<formatter type="plain" outfile="${build.home}/clirr.txt" />
|
2004-06-07 16:28:37 -04:00
|
|
|
</clirr>
|
|
|
|
</target>
|
2006-05-06 10:06:19 -04:00
|
|
|
|
2001-08-17 19:00:26 -04:00
|
|
|
</project>
|