I am trying to build the dom4j JAR, which includes an xml-apis JAR which contains a DOM API that is older than that shipped with more recent JDKs.
However, even though in the build file the source and target compiler attributes are set to 1.3, and even though the xml-apis JAR is included in the build path, Ant still tries to compile dom4j against another, newer, w3c API (I guess one from a JDK installation).
Here's the relevant Ant code:
<path id="compile.classpath">
<fileset dir="./lib/endorsed">
<include name="*.jar" />
</fileset>
<fileset dir="./lib">
<include name="*.jar" />
</fileset>
</path>
<target name="compile" depends="prepare-src">
<javac srcdir="${build.src}"
destdir="${build.dest}"
debug="${debug}"
optimize="${optimize}"
target="1.3"
source="1.3"
deprecation="${deprecation}"
classpathref="compile.classpath">
</javac>
</target>
the JAR that should be used is in lib/endorsed, but it's not used during compilation.
How come?