]> source.dussan.org Git - poi.git/commitdiff
When running the "compile-ooxml-xsds" ant task, also generate the source jar for...
authorNick Burch <nick@apache.org>
Tue, 3 Nov 2009 23:20:33 +0000 (23:20 +0000)
committerNick Burch <nick@apache.org>
Tue, 3 Nov 2009 23:20:33 +0000 (23:20 +0000)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@832596 13f79535-47bb-0310-9956-ffa450edef68

build.xml
src/documentation/content/xdocs/status.xml

index 6feaf34826538a3033476fb4d19aa53b7df25ffc..2149229161757d1f96d2736e23ca92dd7e1c0464 100644 (file)
--- a/build.xml
+++ b/build.xml
@@ -138,6 +138,9 @@ under the License.
   <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%201st%20edition%20Part%204%20(PDF).zip" />
+  <property name="ooxml.xsds.tmp.dir" location="build/ooxml-xsds"/>
+  <property name="ooxml.xsds.src.dir" location="build/ooxml-xsds-src"/>
+  <property name="ooxml.xsds.src.jar" location="${ooxml.lib}/ooxml-schemas-src.jar"/>
   <property name="ooxml.xsds.jar" location="${ooxml.lib}/ooxml-schemas.jar"/>
 
   <property name="maven.ooxml.xsds.version.id" value="1.0"/>
@@ -292,6 +295,7 @@ under the License.
         <mkdir dir="${jdepend.report.dir}"/>
         <mkdir dir="${jdepend.report.out.dir}"/>
         <mkdir dir="${apidocs.report.dir}"/>
+        <mkdir dir="${ooxml.xsds.tmp.dir}" />
         <mkdir dir="${dist.dir}"/>
         <mkdir dir="${build.site.src}/${main.documentation}"/>
 
@@ -409,23 +413,31 @@ under the License.
         description="Unpacks the OOXML xsd files, and compiles them into XmlBeans">
                <taskdef name="xmlbean"
                        classname="org.apache.xmlbeans.impl.tool.XMLBean"
-                       classpath="${ooxml.jar2.dir}:${ooxml.jar3.dir}:${ooxml.jar4.dir}:${ooxml.jar4.dir}:${ooxml.jar5.dir}" />
+                       classpath="${ooxml.dom4j.jar}:${ooxml.xmlbeans.jar}:${ooxml.jsr173.jar}" />
 
-               <unzip src="${ooxml.xsds.izip}" dest="build/ooxml-xsds/" />
+               <unzip src="${ooxml.xsds.izip}" dest="${ooxml.xsds.tmp.dir}" />
                <!--
                        schema="build/ooxml-xsds/"
                        schema="build/ooxml-xsds/sml-workbook.xsd"
                -->
                <xmlbean
-                       schema="build/ooxml-xsds/"
+                       schema="${ooxml.xsds.tmp.dir}"
+                       srcgendir="${ooxml.xsds.src.dir}"
+                       optimize="yes"
                        destfile="${ooxml.xsds.jar}"
-                       javasource="1.4"
+                       javasource="1.5"
                        failonerror="true"
                        fork="true"
                        memoryMaximumSize="512m"
                >
                        <classpath refid="ooxml.classpath"/>
                </xmlbean>
+
+               <!-- Now make a jar of the schema sources -->
+               <jar
+                       basedir="${ooxml.xsds.src.dir}"
+                       destfile="${ooxml.xsds.src.jar}"
+               />
        </target>
 
   <target name="compile" depends="init, compile-main, 
index 2d9fe5a3dd2445556928640e71c2f8e20f35ba23..120f6dc709559c15fc15b1e2dab2ba1456e5f9fb 100644 (file)
@@ -34,6 +34,7 @@
 
     <changes>
         <release version="3.6-beta1" date="2009-??-??">
+           <action dev="POI-DEVELOPERS" type="add">When running the "compile-ooxml-xsds" ant task, also generate the source jar for the OOXML Schemas</action>
            <action dev="POI-DEVELOPERS" type="fix">45672 - improve handling by MissingRecordAwareHSSFListener of records that cover multiple cells (MulBlankRecord and MulRKRecord)</action>
            <action dev="POI-DEVELOPERS" type="fix">48096 - relaxed validation check in RecalcIdRecord</action>
            <action dev="POI-DEVELOPERS" type="fix">48085 - improved error checking in BlockAllocationTableReader to trap unreasonable field values</action>