added targets to build binary distributions

git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130677 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Morgan James Delagrange 2002-03-28 05:13:54 +00:00
parent 59a50d1b9b
commit 9b81356c39
1 changed files with 53 additions and 3 deletions

View File

@ -1,4 +1,4 @@
<!-- $Id: build.xml,v 1.22 2002/03/19 01:21:53 jefft Exp $ --> <!-- $Id: build.xml,v 1.23 2002/03/28 05:13:54 morgand Exp $ -->
<project name="commons-collections" default="test" basedir="."> <project name="commons-collections" default="test" basedir=".">
<!-- patternset describing files to be copied from the doc directory --> <!-- patternset describing files to be copied from the doc directory -->
@ -70,6 +70,12 @@
<property name="dest.jardir" value="${dest}"/> <property name="dest.jardir" value="${dest}"/>
<property name="dest.jardir.jar" value="${dest.jardir}/${name}.jar"/> <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"/>
<available property="available-doc" file="${source.doc}"/> <!-- does this module have docs? --> <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-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? --> <available property="available-src-test" file="${source.src.test}"/> <!-- does this module have test src? -->
@ -223,7 +229,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"> <target name="dist-jar" depends="build">
<mkdir dir="${dest.jardir}"/> <mkdir dir="${dest.jardir}"/>
@ -238,6 +244,50 @@
</jar> </jar>
<delete dir="${workdir}"/> <delete dir="${workdir}"/>
<delete dir="${dest.classes}"/> <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}">
<exclude name="${bin.name}.zip"/>
<exclude name="${bin.name}.tar.gz"/>
</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}">
<exclude name="${bin.name}.zip"/>
<exclude name="${bin.name}.tar.gz"/>
</fileset>
</copy>
<!-- create a zip file -->
<zip zipfile="${dest.bin.zip}" >
<zipfileset dir="${workdir}" />
</zip>
<delete dir="${workdir}"/>
</target> </target>
<!-- ######################################################### --> <!-- ######################################################### -->