Now puts various LICENSE files in our exportsrc tar.gz and in the xml-apis.jar itself

git-svn-id: https://svn.apache.org/repos/asf/xml/commons/trunk@225956 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
curcuru 2002-02-06 11:58:46 +00:00
parent fd81a7b593
commit d4fe4c89f6

View File

@ -7,8 +7,10 @@
<project name="xml-commons-external" default="jar" > <project name="xml-commons-external" default="jar" >
<!-- Name and version information --> <!-- Name and version information -->
<property name="name.external" value="xml-commons-external"/> <property name="name.external" value="xml-apis"/>
<property name="impl.name" value="XmlCommons"/> <property name="impl.name" value="XmlCommons"/>
<!-- If no external version is provided, don't use one -->
<property name="version" value=""/>
<property name="impl.version" value="${version}"/> <property name="impl.version" value="${version}"/>
<!-- Location of the system's temporary directory; all output sent here --> <!-- Location of the system's temporary directory; all output sent here -->
@ -25,11 +27,26 @@
<property name="src.dir" value="src" /> <property name="src.dir" value="src" />
<property name="docs.dir" value="xdocs" /> <property name="docs.dir" value="xdocs" />
<property name="api.jar.location" value="${build.dir}" /> <property name="api.jar.location" value="${build.dir}" />
<property name="api.jar.name" value="xml-apis.jar" /> <property name="api.jar.name" value="${name.external}.jar" />
<property name="api.jar" value="${api.jar.location}/${api.jar.name}" /> <property name="api.jar" value="${api.jar.location}/${api.jar.name}" />
<target name="all" depends="jar,javadoc" <!-- License and readme files of various types -->
description="Jar external classes and create javadoc"> <property name="licenses.external.dir" value="."/>
<patternset id="licenses.external">
<include name="LICENSE.dom-documentation.txt" />
<include name="LICENSE.dom-software.txt" />
<include name="README.dom.txt" />
<include name="LICENSE.sax.txt" />
<include name="README.sax.txt" />
</patternset>
<property name="licenses.asf.dir" value="../.."/>
<patternset id="licenses.asf" >
<include name="LICENSE.txt" />
<include name="README.txt" />
</patternset>
<target name="all" depends="jar,javadoc,exportsrc"
description="Jar external classes, create javadoc, create sources.tar.gz">
</target> </target>
<target name="prepare" <target name="prepare"
@ -54,6 +71,19 @@
<target name="jar" depends="compile" <target name="jar" depends="compile"
description="Jar all classes"> description="Jar all classes">
<echo message="Jarring ${api.jar} from ${build.classes.dir}" /> <echo message="Jarring ${api.jar} from ${build.classes.dir}" />
<!-- Copy various licenses so they appear in the .jar file -->
<property name="jar-licenses" value="${build.classes.dir}/license" />
<mkdir dir="${jar-licenses}" />
<copy todir="${jar-licenses}">
<fileset dir="${licenses.external.dir}">
<patternset refid="licenses.external"/>
</fileset>
<fileset dir="${licenses.asf.dir}">
<patternset refid="licenses.asf"/>
</fileset>
</copy>
<jar jarfile="${api.jar}" <jar jarfile="${api.jar}"
basedir="${build.classes.dir}" basedir="${build.classes.dir}"
manifest="${build.dir}/manifest.commons" /> manifest="${build.dir}/manifest.commons" />
@ -67,8 +97,9 @@
version="yes" version="yes"
windowtitle="${external.javadoc.title}" windowtitle="${external.javadoc.title}"
doctitle="${external.javadoc.title}" doctitle="${external.javadoc.title}"
bottom="This document is in the PUBLIC DOMAIN and comes with NO WARRANTY of any kind."
/> />
<!-- Legal question: what should the bottom= copyright line be
for this mixed set of javadocs? -->
<!-- Just copy existing .html files over as well --> <!-- Just copy existing .html files over as well -->
<copy todir="${build.docs.dir}"> <copy todir="${build.docs.dir}">
<fileset dir="${docs.dir}"/> <fileset dir="${docs.dir}"/>
@ -77,7 +108,8 @@
<target name="exportsrc" depends="prepare" <target name="exportsrc" depends="prepare"
description="Create a simple distribution of sources"> description="Create a simple distribution of sources">
<!-- Note: this not a complete public distro layout yet! -sc --> <!-- Note: this *only* a copy of the .java sources that
go into our .jar file, not all our sources! -->
<patternset id="external-srcs" > <patternset id="external-srcs" >
<!-- Relative to external/src, which is ${src.dir} --> <!-- Relative to external/src, which is ${src.dir} -->
@ -92,6 +124,12 @@
<tarfileset dir="${build.dir}"> <tarfileset dir="${build.dir}">
<include name="manifest.commons"/> <include name="manifest.commons"/>
</tarfileset> </tarfileset>
<tarfileset dir="${licenses.external.dir}">
<patternset refid="licenses.external"/>
</tarfileset>
<tarfileset dir="${licenses.asf.dir}">
<patternset refid="licenses.asf"/>
</tarfileset>
</tar> </tar>
<gzip src="${build.dir}/${name.external}-${impl.version}-src.tar" zipfile="${build.dir}/${name.external}-${impl.version}-src.tar.gz"/> <gzip src="${build.dir}/${name.external}-${impl.version}-src.tar" zipfile="${build.dir}/${name.external}-${impl.version}-src.tar.gz"/>
<delete file="${build.dir}/${name.external}-${impl.version}-src.tar" /> <delete file="${build.dir}/${name.external}-${impl.version}-src.tar" />