Update build.xml to download various libraries that we will want for playing with ooxml files

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@606922 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Nick Burch 2007-12-26 17:39:15 +00:00
parent 12cd0bffa1
commit 7990d9fdaa
2 changed files with 113 additions and 2 deletions

View File

@ -70,6 +70,7 @@ under the License.
<property name="main.output.dir" location="build/classes"/>
<property name="main.output.test.dir" location="build/test-classes"/>
<property name="main.lib" location="lib"/>
<property name="ooxml.lib" location="ooxml-lib"/>
<property name="main.reports.test" location="build/test-results"/>
<property name="main.jar1.dir" location="${main.lib}/commons-logging-1.1.jar"/>
<property name="main.jar1.url" value="${repository}/commons-logging/jars/commons-logging-1.1.jar"/>
@ -77,6 +78,9 @@ under the License.
<property name="main.jar2.url" value="${repository}/log4j/jars/log4j-1.2.13.jar"/>
<property name="main.testokfile" location="build/main-testokfile.txt"/>
<property name="junit.jar1.dir" location="${main.lib}/junit-3.8.1.jar"/>
<property name="junit.jar1.url" value="${repository}/junit/jars/junit-3.8.1.jar"/>
<!-- Scratchpad: -->
<property name="scratchpad.src" location="src/scratchpad/src"/>
<property name="scratchpad.src.test" location="src/scratchpad/testcases"/>
@ -116,8 +120,32 @@ under the License.
<property name="examples.jar3.url" value="${repository}/commons-lang/jars/commons-lang-2.1.jar"/>
<property name="examples.testokfile" location="build/examples-testokfile.txt"/>
<property name="junit.jar1.dir" location="${main.lib}/junit-3.8.1.jar"/>
<property name="junit.jar1.url" value="${repository}/junit/jars/junit-3.8.1.jar"/>
<!-- Experimental OOXML support: -->
<property name="ooxml.src" location="src/scratchpad/ooxml-src"/>
<property name="ooxml.src.test" location="src/scratchpad/ooxml-testcases"/>
<property name="ooxml.reports.test" location="build/ooxml-test-results"/>
<property name="ooxml.output.dir" location="build/ooxml-classes"/>
<property name="ooxml.output.test.dir" location="build/ooxml-test-classes"/>
<property name="ooxml.testokfile" location="build/ooxml-testokfile.txt"/>
<property name="ooxml.jar1.dir" location="${ooxml.lib}/dom4j-1.6.1.jar"/>
<property name="ooxml.jar1.url" value="${repository}/dom4j/jars/dom4j-1.6.1.jar"/>
<property name="ooxml.jar2.dir" location="${ooxml.lib}/jaxen-1.1.jar"/>
<property name="ooxml.jar2.url" value="${repository}/jaxen/jars/jaxen-1.1.jar"/>
<property name="ooxml.jar3.dir" location="${ooxml.lib}/xmlbeans-2.3.0.jar"/>
<property name="ooxml.jar3.url" value="${repository}/org.apache.xmlbeans/jars/xmlbeans-2.3.0.jar"/>
<property name="ooxml.jar4.dir" location="${ooxml.lib}/jsr173_1.0_api.jar"/>
<property name="ooxml.jar4.url" value="${repository}/xmlbeans/jars/jsr173_1.0_api.jar"/>
<!-- No official release of openxml4j yet -->
<property name="ooxml.jar5.dir" location="${ooxml.lib}/openxml4j-bin-prealpha-071224.jar"/>
<property name="ooxml.jar5.url" value="http://people.apache.org/~nick/openxml4j-bin-prealpha-071224.jar"/>
<!-- See http://www.ecma-international.org/publications/standards/Ecma-376.htm -->
<!-- "Copy these file(s), free of charge" -->
<property name="ooxml.xsds.ozip" location="${ooxml.lib}/OfficeOpenXML-Part4.zip"/>
<property name="ooxml.xsds.izip" location="${ooxml.lib}/OfficeOpenXML-XMLSchema.zip"/>
<property name="ooxml.xsds.url" value="http://www.ecma-international.org/publications/files/ECMA-ST/Office%20Open%20XML%20Part%204%20(DOCX).zip" />
<property name="build.site" location="build/tmp/site/build/site"/>
<property name="build.site.src" location="build/tmp/site"/>
<property name="junit.report.dir" location="${build.site}/junit"/>
@ -162,6 +190,15 @@ under the License.
<pathelement location="${contrib.output.test.dir}"/>
</path>
<path id="ooxml.classpath">
<path refid="main.classpath"/>
<path refid="scratchpad.classpath"/>
<fileset dir="${ooxml.lib}">
<include name="*.jar" />
</fileset>
</path>
<path id="examples.classpath">
<path refid="main.classpath"/>
<pathelement location="${main.output.dir}"/>
@ -265,6 +302,11 @@ under the License.
<available file="${contrib.jar2.dir}"/>
<available file="${contrib.jar3.dir}"/>
<available file="${junit.jar1.dir}"/>
<available file="${ooxml.jar1.dir}"/>
<available file="${ooxml.jar2.dir}"/>
<available file="${ooxml.jar3.dir}"/>
<available file="${ooxml.jar4.dir}"/>
<available file="${ooxml.jar5.dir}"/>
</and>
<isset property="disconnected"/>
</or>
@ -279,8 +321,54 @@ under the License.
<get src="${contrib.jar2.url}" dest="${contrib.jar2.dir}"/>
<get src="${contrib.jar3.url}" dest="${contrib.jar3.dir}"/>
<get src="${junit.jar1.url}" dest="${junit.jar1.dir}"/>
<get src="${ooxml.jar1.url}" dest="${ooxml.jar1.dir}"/>
<get src="${ooxml.jar2.url}" dest="${ooxml.jar2.dir}"/>
<get src="${ooxml.jar3.url}" dest="${ooxml.jar3.dir}"/>
<get src="${ooxml.jar4.url}" dest="${ooxml.jar4.dir}"/>
<get src="${ooxml.jar5.url}" dest="${ooxml.jar5.dir}"/>
</target>
<target name="check-ooxml-xsds">
<condition property="ooxml-xsds.present">
<or>
<and>
<available file="${ooxml.xsds.izip}"/>
</and>
<isset property="disconnected"/>
</or>
</condition>
</target>
<target name="fetch-ooxml-xsds" unless="ooxml-xsds.present"
description="Fetches needed OOXML xsd files from the Internet">
<get src="${ooxml.xsds.url}" dest="${ooxml.xsds.ozip}"/>
<unzip src="${ooxml.xsds.ozip}" dest="${ooxml.lib}">
<patternset>
<include name="OfficeOpenXML-XMLSchema.zip" />
</patternset>
</unzip>
</target>
<target name="compile-ooxml-xsds" depends="check-jars,fetch-jars,check-ooxml-xsds,fetch-ooxml-xsds"
description="Unpacks the OOXML xsd files, and compiles them into XmlBeans">
<taskdef name="xmlbean"
classname="org.apache.xmlbeans.impl.tool.XMLBean"
classpath="${ooxml.jar3.dir}:${ooxml.jar4.dir}" />
<unzip src="${ooxml.xsds.izip}" dest="build/ooxml-xsds/" />
<!--
schema="build/ooxml-xsds/"
schema="build/ooxml-xsds/sml-workbook.xsd"
-->
<xmlbean
schema="build/ooxml-xsds/"
destfile="${ooxml.lib}/ooxml-schemas.jar"
javasource="1.4"
failonerror="false"
>
<classpath refid="ooxml.classpath"/>
</xmlbean>
</target>
<target name="compile" depends="init, compile-main, compile-scratchpad,
compile-contrib, compile-examples"
description="Compiles the POI main classes, scratchpad, contrib, and examples"/>
@ -363,6 +451,13 @@ under the License.
</javac>
</target>
<target name="compile-ooxml" depends="init, check-ooxml-xsds, fetch-ooxml-xsds, compile-ooxml-xsds, compile-main">
<javac target="${jdk.version.class}" source="${jdk.version.source}"
destdir="${ooxml.output.dir}" debug="on" srcdir="${ooxml.src}">
<classpath refid="ooxml.classpath"/>
</javac>
</target>
<target name="test" depends="test-main,test-scratchpad,test-contrib"
description="Tests main, contrib and scratchpad"/>

View File

@ -17,3 +17,19 @@ Since this is a data file, and has no compiled version (the original
file is distributed in both source and binary versions), there should
be little difference in licencing requirements compared to the ASL.
See http://www.gnome.ru/projects/vsdump_en.html
Office Open XML experimental support:
XML Beans - http://xmlbeans.apache.org/
Apache Licence Version 2.0 - http://www.apache.org/licenses/LICENSE-2.0
DOM4J - http://www.dom4j.org/
BSD Licence - http://www.dom4j.org/license.html
Jaxen - http://jaxen.org/
Apache Style Licence - http://jaxen.org/license.html
OpenXml4J - http://www.openxml4j.org/
BSD Licence or Apache Licence Version 2.0 -
http://www.openxml4j.org/Licensing/Default.html
Office Open XML ECMA Specification -
http://www.ecma-international.org/publications/standards/Ecma-376.htm
Microsoft Open Specification Promise (OSP) -
http://www.microsoft.com/interop/osp/