I have modified my local copy of build.xml so that I can now compile
XalanJ with no problems under JDK 1.4.x (targeted at JDK 1.1.x).
The Details
-----------
I tried to build the current CVS version of XalanJ using JDK 1.1.8 and I
received lots of failures with the current build.xml file. The failures
included a lot of "Cyclic class inheritance or scoping" messages. I
also found several other incompatibilities with JDK 1.1.8. For example,
org\apache\xpath\XPathContext.java:390: Method clear() not found in
class java.util.Stack.
m_axesIteratorStack.clear();
Indeed, this method was not introduced until Java 2 (JDK 1.2). There
are seven such problems altogether.
So, the current CVS will definitely not build under Java 1.1.8 using our
current build.xml file. In addition, it will not run under Java 1.1.8
at the present time even when built under a later JDK.
I have modified the build.xml file to properly build the current CVS
XalanJ using JDK 1.4 but targeting the build to JDK 1.1. The build now
works but the seven problems, of course, prevent the .jar from being
build automatically.
In addition, the invoker of Ant now must supply the location of a JDK
1.1.x classes.zip file if the invoker truly wants to check JDK 1.1.x
compatability. This is required by javac when cross-compiling.
My proposal is that I check in my modifications to build.xml. Each
developer can decided whether or not to supply the:
"-Dbuild.boot.class.path=C:\jdk1.1.8\lib\classes.zip"
command line argument to Ant. If not supplied, XalanJ will build but
compliance with JDK 1.1.x will not be checked. If supplied, JDK 1.1.x
compliance will be checked.
Also, my build.xml requires the current version of Ant (1.5.1). We have
an older version (1.4b1, I believe) in our /bin directory. So, we
should probably update that as well.
Since this affects build.xml, I wanted to get some feedback before
checking this in.
Gary