@@ -106,6 +106,7 @@
<property name="optimize" value="true"/>
<property name="javac.target" value="1.8"/>
<property name="javac.source" value="1.8"/>
<property name="javac.release" value="8"/>
<property name="junit.filtertrace" value="off"/>
<property name="junit.summary" value="no"/>
<property name="test.haltonfailure" value="false"/>
@@ -594,12 +595,67 @@
Build the code
===================================================================
-->
<target name="build" depends="prepare"
<target name="build" depends="prepare, compile, compile-jdk9+ "
description="--> compiles the source code">
<mkdir dir="${build.dir}"/>
<mkdir dir="${build.classes}"/>
<mkdir dir="${build.lib}"/>
<!-- Builds and verifies that the classes belonging in the confined package of
junitlauncher task do not depend on classes they aren't meant to -->
<!-- first wipe out the "confined" package that might have been built already
due to the javac above -->
<delete dir="${build.classes}/${optional.package}/junitlauncher/confined/"/>
<javac srcdir="${java.dir}"
includeantruntime="false"
destdir="${build.classes}"
debug="${debug}"
deprecation="${deprecation}"
includes="${optional.package}/junitlauncher/confined/**"
target="${javac.target}"
source="${javac.source}"
release="${javac.release}"
optimize="${optimize}">
<classpath>
<!-- A very limited classpath which only doesn't include optional libraries,
which the classes in confined package aren't meant to depend on -->
<fileset dir="${build.classes}">
<!-- exclude the org/apache/tools/ant/taskdefs/optional/junitlauncher package
from the classpath, since the confined package isn't meant to depend on
classes in this package -->
<exclude name="org/apache/tools/ant/taskdefs/optional/junitlauncher/*"/>
</fileset>
</classpath>
</javac>
<copy todir="${build.classes}">
<fileset dir="${java.dir}">
<include name="**/*.properties"/>
<include name="**/*.dtd"/>
<include name="**/*.xml"/>
</fileset>
<fileset dir="${resource.dir}"/>
</copy>
<copy todir="${build.classes}"
overwrite="true" encoding="UTF-8">
<fileset dir="${java.dir}">
<include name="**/version.txt"/>
<include name="**/defaultManifest.mf"/>
</fileset>
<filterchain refid="ant.filters"/>
</copy>
<copy todir="${build.classes}/${optional.package}/junit/xsl">
<fileset dir="${etc.dir}">
<include name="junit-frames.xsl"/>
<include name="junit-noframes.xsl"/>
<include name="junit-frames-saxon.xsl"/>
<include name="junit-noframes-saxon.xsl"/>
</fileset>
</copy>
</target>
<target name="compile" depends="prepare">
<mkdir dir="${build.classes}"/>
<javac srcdir="${java.dir}"
includeantruntime="false"
destdir="${build.classes}"
@@ -608,13 +664,14 @@
excludes="${optional.package}/junitlauncher/confined/**"
target="${javac.target}"
source="${javac.source}"
release="${javac.release}"
optimize="${optimize}">
<classpath refid="classpath"/>
<selector id="conditional-patterns">
<not>
<or>
<selector refid="needs.jdk9+" unless="jdk9+" />
<selector refid="needs.jdk9+"/>
<selector refid="not.in.kaffe" if="kaffe"/>
<selector refid="needs.apache-resolver" unless="apache.resolver.present"/>
<selector refid="needs.junit" unless="junit.present"/> <!-- TODO should perhaps use -source 1.4? -->
@@ -645,60 +702,27 @@
</not>
</selector>
</javac>
</target>
<target name="compile-jdk9+" depends="prepare" if="jdk9+">
<mkdir dir="${build.classes}"/>
<!-- Builds and verifies that the classes belonging in the confined package of
junitlauncher task do not depend on classes they aren't meant to -->
<!-- first wipe out the "confined" package that might have been built already
due to the javac above -->
<delete dir="${build.classes}/${optional.package}/junitlauncher/confined/"/>
<javac srcdir="${java.dir}"
includeantruntime="false"
destdir="${build.classes}"
debug="${debug}"
deprecation="${deprecation}"
includes="${optional.package}/junitlauncher/confined/**"
target="${javac.target}"
source="${javac.source}"
optimize="${optimize}">
<classpath>
<!-- A very limited classpath which only doesn't include optional libraries,
which the classes in confined package aren't meant to depend on -->
<fileset dir="${build.classes}">
<!-- exclude the org/apache/tools/ant/taskdefs/optional/junitlauncher package
from the classpath, since the confined package isn't meant to depend on
classes in this package -->
<exclude name="org/apache/tools/ant/taskdefs/optional/junitlauncher/*"/>
</fileset>
</classpath>
<classpath refid="classpath"/>
<selector id="conditional-patterns-jdk9+">
<or>
<selector refid="needs.jdk9+"/>
</or>
</selector>
</javac>
<copy todir="${build.classes}">
<fileset dir="${java.dir}">
<include name="**/*.properties"/>
<include name="**/*.dtd"/>
<include name="**/*.xml"/>
</fileset>
<fileset dir="${resource.dir}"/>
</copy>
<copy todir="${build.classes}"
overwrite="true" encoding="UTF-8">
<fileset dir="${java.dir}">
<include name="**/version.txt"/>
<include name="**/defaultManifest.mf"/>
</fileset>
<filterchain refid="ant.filters"/>
</copy>
<copy todir="${build.classes}/${optional.package}/junit/xsl">
<fileset dir="${etc.dir}">
<include name="junit-frames.xsl"/>
<include name="junit-noframes.xsl"/>
<include name="junit-frames-saxon.xsl"/>
<include name="junit-noframes-saxon.xsl"/>
</fileset>
</copy>
</target>
<!--
@@ -1574,6 +1598,7 @@
debug="${debug}"
target="${javac.target}"
source="${javac.source}"
release="${javac.release}"
deprecation="${deprecation}">
<classpath refid="tests-classpath"/>