Author: jeremias
Date: Fri Jan 21 08:21:12 2011
New Revision: 1061678

URL: http://svn.apache.org/viewvc?rev=1061678&view=rev
Log:
Reduced task attribute redundancy by using <presetdef>.
Added maxmemory="256m" on junit instead of a JVM argument to overcome 
OutOfMemoryErrors that I have since moving to Windows 7 64bit.

Modified:
    xmlgraphics/fop/trunk/build.xml

Modified: xmlgraphics/fop/trunk/build.xml
URL: 
http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/build.xml?rev=1061678&r1=1061677&r2=1061678&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/build.xml (original)
+++ xmlgraphics/fop/trunk/build.xml Fri Jan 21 08:21:12 2011
@@ -205,8 +205,21 @@ list of possible build targets.
   <property environment="env"/>
   <property name="forrest.home" value="${env.FORREST_HOME}"/>
   <import file="${env.FORREST_HOME}/main/forrest.build.xml" optional="true"/>
-  -->
-<!-- =================================================================== -->
+-->
+  
+  <presetdef name="javac">
+    <javac fork="${javac.fork}"
+      debug="${javac.debug}"
+      deprecation="${javac.deprecation}"
+      optimize="${javac.optimize}"
+      source="${javac.source}" target="${javac.target}"/>
+  </presetdef>
+  
+  <presetdef name="junit">
+    <junit haltonfailure="${junit.haltonfailure}" fork="${junit.fork}" 
maxmemory="256m"/>
+  </presetdef>
+  
+  <!-- =================================================================== -->
 <!-- Initialization target                                               -->
 <!-- =================================================================== -->
   <target name="init" depends="init-avail">
@@ -332,7 +345,7 @@ list of possible build targets.
   <target name="compile-java" depends="init, codegen">
 <!-- create directories -->
     <mkdir dir="${build.classes.dir}"/>
-    <javac destdir="${build.classes.dir}" fork="${javac.fork}" 
debug="${javac.debug}" deprecation="${javac.deprecation}" 
optimize="${javac.optimize}" source="${javac.source}" target="${javac.target}" 
includeAntRuntime="true">
+    <javac destdir="${build.classes.dir}" includeAntRuntime="true">
       <src path="${build.gensrc.dir}"/>
       <src path="${src.java.dir}"/>
       <patternset includes="**/*.java"/>
@@ -341,7 +354,7 @@ list of possible build targets.
       <classpath refid="libs-build-classpath"/>
     </javac>
     <mkdir dir="${build.sandbox-classes.dir}"/>
-    <javac destdir="${build.sandbox-classes.dir}" fork="${javac.fork}" 
debug="${javac.debug}" deprecation="${javac.deprecation}" 
optimize="${javac.optimize}" source="${javac.source}" target="${javac.target}" 
includeAntRuntime="true">
+    <javac destdir="${build.sandbox-classes.dir}" includeAntRuntime="true">
       <src path="${src.sandbox.dir}"/>
       <patternset includes="**/*.java"/>
       <patternset refid="exclude-jai"/>
@@ -353,7 +366,7 @@ list of possible build targets.
   </target>
   <target name="resourcegen" depends="compile-java">
     <mkdir dir="${build.codegen-classes.dir}"/>
-    <javac destdir="${build.codegen-classes.dir}" fork="${javac.fork}" 
debug="${javac.debug}" deprecation="${javac.deprecation}" 
optimize="${javac.optimize}" source="${javac.source}" target="${javac.target}" 
includeAntRuntime="true">
+    <javac destdir="${build.codegen-classes.dir}" includeAntRuntime="true">
       <src path="${src.codegen.dir}/java"/>
       <patternset includes="**/*.java"/>
       <classpath>
@@ -417,7 +430,7 @@ list of possible build targets.
   <!-- (src/java/org/apache/fop/hyphenation/classes.xml). -->
   <!-- =================================================================== -->
   <target name="codegen-hyphenation-classes">
-    <javac destdir="${build.codegen-classes.dir}" fork="${javac.fork}" 
debug="${javac.debug}" deprecation="${javac.deprecation}" 
optimize="${javac.optimize}" source="${javac.source}" target="${javac.target}">
+    <javac destdir="${build.codegen-classes.dir}">
       <src path="${src.codegen.dir}/unicode/java"/>
     </javac>
        <java classname="org.apache.fop.hyphenation.UnicodeClasses" 
resultproperty="classes.result" classpath="${build.codegen-classes.dir}">
@@ -697,7 +710,7 @@ list of possible build targets.
     <mkdir dir="${build.dir}/test-classes"/>
     <mkdir dir="${build.dir}/test-gensrc"/>
     <mkdir dir="${junit.reports.dir}"/>
-    <javac destdir="${build.dir}/test-classes" fork="${javac.fork}" 
debug="${javac.debug}" deprecation="${javac.deprecation}" 
optimize="${javac.optimize}" source="${javac.source}" target="${javac.target}" 
includeAntRuntime="true">
+    <javac destdir="${build.dir}/test-classes" includeAntRuntime="true">
       <src path="${test.dir}/java"/>
       <patternset refid="test-sources"/>
       <classpath>
@@ -733,7 +746,7 @@ list of possible build targets.
   <target name="junit-compile" depends="junit-compile-java, 
junit-compile-copy-resources" description="Compiles FOP's JUnit tests" 
if="junit.present"/>
   <target name="junit-transcoder" depends="junit-compile" description="Runs 
FOP's JUnit transcoder tests" if="junit.present">
     <echo message="Running basic functionality tests for fop-transcoder.jar"/>
-    <junit dir="${basedir}" haltonfailure="${junit.haltonfailure}" 
fork="${junit.fork}">
+    <junit dir="${basedir}">
       <sysproperty key="basedir" value="${basedir}"/>
       <sysproperty key="jawa.awt.headless" value="true"/>
       <formatter type="brief" usefile="false"/>
@@ -755,7 +768,7 @@ list of possible build targets.
          previous test block succeeded it indicates that the packaging of the 
allinone
          JAR needs to be updated.
     -->
-    <junit dir="${basedir}" haltonfailure="${junit.haltonfailure}" 
fork="${junit.fork}" errorproperty="fop.junit.error" 
failureproperty="fop.junit.failure">
+    <junit dir="${basedir}" errorproperty="fop.junit.error" 
failureproperty="fop.junit.failure">
       <sysproperty key="basedir" value="${basedir}"/>
       <sysproperty key="jawa.awt.headless" value="true"/>
       <formatter type="brief" usefile="false"/>
@@ -778,8 +791,7 @@ list of possible build targets.
   </target>
   <target name="junit-userconfig" depends="junit-compile" if="junit.present" 
description="Runs FOP's user config JUnit tests">
     <echo message="Running user config tests"/>
-    <junit dir="${basedir}" haltonfailure="${junit.haltonfailure}" 
fork="${junit.fork}" errorproperty="fop.junit.error" 
failureproperty="fop.junit.failure">
-      <jvmarg value="-Xmx1024m"/>
+    <junit dir="${basedir}" errorproperty="fop.junit.error" 
failureproperty="fop.junit.failure">
       <sysproperty key="basedir" value="${basedir}"/>
       <sysproperty key="jawa.awt.headless" value="true"/>
       <sysproperty key="fop.layoutengine.disabled" 
value="${layoutengine.disabled}"/>
@@ -796,7 +808,7 @@ list of possible build targets.
   </target>
   <target name="junit-basic" depends="junit-compile" description="Runs FOP's 
JUnit basic tests" if="junit.present">
     <echo message="Running basic functionality tests for fop.jar"/>
-    <junit dir="${basedir}" haltonfailure="${junit.haltonfailure}" 
fork="${junit.fork}" errorproperty="fop.junit.error" 
failureproperty="fop.junit.failure">
+    <junit dir="${basedir}" errorproperty="fop.junit.error" 
failureproperty="fop.junit.failure">
       <sysproperty key="basedir" value="${basedir}"/>
       <sysproperty key="jawa.awt.headless" value="true"/>
       <formatter type="brief" usefile="false"/>
@@ -832,7 +844,7 @@ list of possible build targets.
   </target>
   <target name="junit-layout-standard" depends="junit-compile, junit-fotree" 
if="junit.present" description="Runs FOP's standard JUnit layout tests">
     <echo message="Running standard layout engine tests"/>
-    <junit dir="${basedir}" haltonfailure="${junit.haltonfailure}" 
fork="${junit.fork}" errorproperty="fop.junit.error" 
failureproperty="fop.junit.failure">
+    <junit dir="${basedir}" errorproperty="fop.junit.error" 
failureproperty="fop.junit.failure">
       <sysproperty key="basedir" value="${basedir}"/>
       <sysproperty key="jawa.awt.headless" value="true"/>
       <sysproperty key="fop.layoutengine.disabled" 
value="${layoutengine.disabled}"/>
@@ -849,7 +861,7 @@ list of possible build targets.
   </target>
   <target name="junit-layout-hyphenation" depends="hyphenation-present, 
junit-compile" if="hyphenation.present" description="Runs FOP's JUnit 
hyphenation layout tests">
     <echo message="Running hyphenation layout engine tests"/>
-    <junit dir="${basedir}" haltonfailure="${junit.haltonfailure}" 
fork="${junit.fork}" errorproperty="fop.junit.error" 
failureproperty="fop.junit.failure">
+    <junit dir="${basedir}" errorproperty="fop.junit.error" 
failureproperty="fop.junit.failure">
       <sysproperty key="basedir" value="${basedir}"/>
       <sysproperty key="jawa.awt.headless" value="true"/>
       <sysproperty key="fop.layoutengine.disabled" 
value="${layoutengine.disabled}"/>
@@ -867,7 +879,7 @@ list of possible build targets.
   <target name="junit-layout" depends="junit-layout-standard, 
junit-layout-hyphenation" description="Runs all FOP's JUnit layout tests"/>
   <target name="junit-fotree" depends="junit-compile" description="Runs FOP's 
FO tree JUnit tests" if="junit.present">
     <echo message="Running fo tree tests"/>
-    <junit dir="${basedir}" haltonfailure="${junit.haltonfailure}" 
fork="${junit.fork}" errorproperty="fop.junit.error" 
failureproperty="fop.junit.failure">
+    <junit dir="${basedir}" errorproperty="fop.junit.error" 
failureproperty="fop.junit.failure">
       <sysproperty key="basedir" value="${basedir}"/>
       <sysproperty key="jawa.awt.headless" value="true"/>
       <sysproperty key="fop.layoutengine.disabled" value="${fotree.disabled}"/>
@@ -891,7 +903,7 @@ list of possible build targets.
     <attribute name="outfile"/>
     <sequential>
       <echo message="Running @{title} tests..."/>
-      <junit dir="${basedir}" haltonfailure="${junit.haltonfailure}" 
fork="${junit.fork}" errorproperty="fop.junit.error" 
failureproperty="fop.junit.failure">
+      <junit dir="${basedir}" errorproperty="fop.junit.error" 
failureproperty="fop.junit.failure">
         <sysproperty key="basedir" value="${basedir}/@{basedir}"/>
         <sysproperty key="jawa.awt.headless" value="true"/>
         <sysproperty key="fop.layoutengine.disabled" 
value="${layoutengine.disabled}"/>
@@ -928,7 +940,7 @@ list of possible build targets.
   </target>
   <target name="junit-text-linebreak" depends="junit-compile" 
description="Runs FOP's JUnit unicode linebreak tests" if="junit.present">
     <echo message="Running tests for Unicode UAX#14 support"/>
-    <junit dir="${basedir}" haltonfailure="${junit.haltonfailure}" 
fork="${junit.fork}" errorproperty="fop.junit.error" 
failureproperty="fop.junit.failure">
+    <junit dir="${basedir}" errorproperty="fop.junit.error" 
failureproperty="fop.junit.failure">
       <sysproperty key="basedir" value="${basedir}"/>
       <sysproperty key="jawa.awt.headless" value="true"/>
       <formatter type="brief" usefile="false"/>
@@ -1417,7 +1429,7 @@ NOTE:
   <!-- =================================================================== -->
   <target name="codegen-unicode" >
     <mkdir dir="${build.codegen-classes.dir}"/>
-    <javac destdir="${build.codegen-classes.dir}" fork="${javac.fork}" 
debug="${javac.debug}" deprecation="${javac.deprecation}" 
optimize="${javac.optimize}" source="${javac.source}" target="${javac.target}">
+    <javac destdir="${build.codegen-classes.dir}">
       <src path="${src.codegen.dir}/unicode/java"/>
     </javac>
     <java classname="org.apache.fop.text.linebreak.GenerateLineBreakUtils" 
classpath="${build.codegen-classes.dir}">



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to