poi-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From n...@apache.org
Subject svn commit: r606922 - in /poi/trunk: build.xml legal/NOTICE ooxml-lib/
Date Wed, 26 Dec 2007 17:39:21 GMT
Author: nick
Date: Wed Dec 26 09:39:15 2007
New Revision: 606922

URL: http://svn.apache.org/viewvc?rev=606922&view=rev
Log:
Update build.xml to download various libraries that we will want for playing with ooxml files

Added:
    poi/trunk/ooxml-lib/   (with props)
Modified:
    poi/trunk/build.xml
    poi/trunk/legal/NOTICE

Modified: poi/trunk/build.xml
URL: http://svn.apache.org/viewvc/poi/trunk/build.xml?rev=606922&r1=606921&r2=606922&view=diff
==============================================================================
--- poi/trunk/build.xml (original)
+++ poi/trunk/build.xml Wed Dec 26 09:39:15 2007
@@ -70,6 +70,7 @@
   <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 @@
   <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 @@
   <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 @@
         <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 @@
                     <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 @@
         <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"/>
@@ -360,6 +448,13 @@
     <javac target="${jdk.version.class}" source="${jdk.version.source}"
       destdir="${examples.output.dir}" debug="on" srcdir="${examples.src}">
       <classpath refid="examples.classpath"/>
+    </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>
 

Modified: poi/trunk/legal/NOTICE
URL: http://svn.apache.org/viewvc/poi/trunk/legal/NOTICE?rev=606922&r1=606921&r2=606922&view=diff
==============================================================================
--- poi/trunk/legal/NOTICE (original)
+++ poi/trunk/legal/NOTICE Wed Dec 26 09:39:15 2007
@@ -17,3 +17,19 @@
  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/

Propchange: poi/trunk/ooxml-lib/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Wed Dec 26 09:39:15 2007
@@ -0,0 +1,7 @@
+dom4j*.jar
+jaxen*.jar
+xmlbeans*.jar
+jsr173*.jar
+openxml4j*.jar
+OfficeOpenXML*.zip
+ooxml-schemas.jar



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@poi.apache.org
For additional commands, e-mail: commits-help@poi.apache.org


Mime
View raw message