diff options
Diffstat (limited to 'build.xml')
-rw-r--r-- | build.xml | 49 |
1 files changed, 31 insertions, 18 deletions
@@ -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> @@ -724,6 +737,7 @@ list of possible build targets. <fileset dir="${test.dir}/java"> <include name="META-INF/**"/> <include name="**/*.xml"/> + <include name="**/*.fo"/> </fileset> <fileset dir="${build.dir}/test-gensrc"> <include name="**/*.xml"/> @@ -733,7 +747,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 +769,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 +792,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 +809,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 +845,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 +862,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 +880,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 +904,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 +941,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 +1430,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}"> |