]> source.dussan.org Git - poi.git/commitdiff
Compiling the OOXML xsds requires a bit more memory if on a 64 bit jvm
authorNick Burch <nick@apache.org>
Tue, 10 Aug 2010 14:58:16 +0000 (14:58 +0000)
committerNick Burch <nick@apache.org>
Tue, 10 Aug 2010 14:58:16 +0000 (14:58 +0000)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@984064 13f79535-47bb-0310-9956-ffa450edef68

build.xml

index 3f141b371843def10a9db9bc7f11b247d6d1ce85..83df2140621bd8e1d2fbdd5dd4a5103d83ff52a4 100644 (file)
--- a/build.xml
+++ b/build.xml
@@ -380,6 +380,13 @@ under the License.
                  classname="org.apache.xmlbeans.impl.tool.XMLBean"
                  classpath="${ooxml.xmlbeans.jar}:${ooxml.jsr173.jar}"/>
 
+        <!-- We need a fair amount of memory to compile the xml schema, -->
+        <!--  but limit it in case it goes wrong! -->
+        <!-- Pick the right amount based on 32 vs 64 bit jvm -->
+        <condition property="ooxml.memory" value="768m" else="512m">
+           <equals arg1="${sun.arch.data.model}" arg2="64" />
+        </condition>
+
         <unzip src="${ooxml.xsds.izip}" dest="${ooxml.xsds.tmp.dir}"/>
         <!--
               schema="build/ooxml-xsds/"
@@ -393,7 +400,7 @@ under the License.
                 javasource="1.5"
                 failonerror="true"
                 fork="true"
-                memoryMaximumSize="512m"
+                memoryMaximumSize="${ooxml.memory}"
                 >
             <classpath refid="ooxml.classpath"/>
         </xmlbean>