Hello,
Morris Kwan and I independently came across and solved this issue
with the xml-xalan/test/build.sh. It seems that a number of changes that
went into xml-xalan/test/build.bat were never reflected in
xml-xalan/test/build.sh, so the behaviour of the two was different. In
particular:
- The default values of PARSER_JAR ("xercesImpl.jar" vs.
"../java/bin/xercesImpl.jar") and XML_APIS_JAR (no value vs.
"../java/bin/xml-apis.jar")
- The order in which jars were placed in the CLASSPATH was
different between the two as well.
It would be really good if some other people developing on various
flavours of Unix could exercise this patch.
Thanks,
Henry
------------------------------------------------------------------
Henry Zongaro Xalan development
IBM SWS Toronto Lab Tie Line 969-6044; Phone (905) 413-6044
mailto:[EMAIL PROTECTED]
Index: xml-xalan/test/build.sh
===================================================================
RCS file: /home/cvspublic/xml-xalan/test/build.sh,v
retrieving revision 1.3
diff -u -r1.3 build.sh
--- xml-xalan/test/build.sh 1 Feb 2002 23:06:32 -0000 1.3
+++ xml-xalan/test/build.sh 29 Jun 2002 10:28:46 -0000
@@ -14,21 +14,23 @@
# If PARSER_JAR is not set, default to xercesImpl.jar
if [ "$PARSER_JAR" = "" ] ; then
- PARSER_JAR=xercesImpl.jar
+ PARSER_JAR=../java/bin/xercesImpl.jar
+fi
+
+if [ "$XML_APIS_JAR" = "" ]; then
+ XML_APIS_JAR=../java/bin/xml-apis.jar
fi
if [ "$ANT_HOME" = "" ] ; then
# try to find ANT
if [ -d /opt/ant ] ; then
ANT_HOME=/opt/ant
- fi
-
- if [ -d ${HOME}/opt/ant ] ; then
+ elif [ -d ${HOME}/opt/ant ] ; then
ANT_HOME=${HOME}/opt/ant
+ else
+ # Otherwise, just default the one over in java
+ ANT_HOME=../java
fi
-
- # Otherwise, just default the one over in java
- ANT_HOME=../java
fi
if [ "$JAVA_HOME" != "" ] ; then
@@ -41,40 +43,51 @@
fi
fi
-# If JARDIR is set, prepend all .jars there to our classpath
-if [ "$JARDIR" != "" ] ; then
- DIRLIBS=${JARDIR}/*.jar
- for i in ${DIRLIBS}
- do
- if [ "$i" != "${DIRLIBS}" ] ; then
- _ANT_CP="$i":$_ANT_CP
- fi
- done
-fi
-
# add in the dependency .jar files (copied from ant)
-_ANT_CP=$_ANT_CP:$ANT_HOME/bin/ant.jar
DIRLIBS=${ANT_HOME}/lib/*.jar
+unset _ANT_CP
for i in ${DIRLIBS}
do
# if the directory is empty, then it will return the input string
- # this is stupid, so case for it
+ # this is stupid, so check for it
if [ "$i" != "${DIRLIBS}" ] ; then
_ANT_CP=$_ANT_CP:"$i"
fi
done
-if [ "$CLASSPATH" != "" ] ; then
- _ANT_CP=$_ANT_CP:$CLASSPATH
+DIRLIBS=${ANT_HOME}/bin/*.jar
+unset _ANT_CP
+for i in ${DIRLIBS}
+do
+ # if the directory is empty, then it will return the input string
+ # this is stupid, so check for it
+ if [ "$i" != "${DIRLIBS}" ] ; then
+ _ANT_CP=$_ANT_CP:"$i"
+ fi
+done
+
+# If JARDIR is set, prepend all .jars there to our classpath
+if [ "$JARDIR" != "" ] ; then
+ CLASSPATH=${_ANT_CP}:${CLASSPATH}
+
+ DIRLIBS=${JARDIR}/*.jar
+ for i in ${DIRLIBS}
+ do
+ if [ "$i" != "${DIRLIBS}" ] ; then
+ CLASSPATH="$i":${CLASSPATH}
+ fi
+ done
+else
+ CLASSPATH=${CLASSPATH}:${_ANT_CP}:${PARSER_JAR}:${XML_APIS_JAR}
fi
if [ "$JAVA_HOME" != "" ] ; then
if test -f $JAVA_HOME/lib/tools.jar ; then
- _ANT_CP=$_ANT_CP:$JAVA_HOME/lib/tools.jar
+ CLASSPATH=${CLASSPATH}:${JAVA_HOME}/lib/tools.jar
fi
if test -f $JAVA_HOME/lib/classes.zip ; then
- _ANT_CP=$_ANT_CP:$JAVA_HOME/lib/classes.zip
+ CLASSPATH=${CLASSPATH}:${JAVA_HOME}/lib/classes.zip
fi
else
echo "Warning: JAVA_HOME environment variable is not set."
@@ -92,7 +105,10 @@
fi
fi
-echo Running: $JAVACMD -classpath "$_ANT_CP" -Dant.home="${ANT_HOME}" $ANT_OPTS
org.apache.tools.ant.Main "$@"
-$JAVACMD -classpath "$_ANT_CP" -Dant.home="${ANT_HOME}" $ANT_OPTS
org.apache.tools.ant.Main "$@"
+# also pass along the selected parser to Ant
+ANT_OPTS="${ANT_OPTS} -Dparserjar=${PARSER_JAR}"
+
+echo Running: $JAVACMD ${JAVA_OPTS} -classpath "${CLASSPATH}"
+-Dant.home="${ANT_HOME}" $ANT_OPTS org.apache.tools.ant.Main "$@"
+$JAVACMD ${JAVA_OPTS} -classpath "${CLASSPATH}" -Dant.home="${ANT_HOME}" $ANT_OPTS
+org.apache.tools.ant.Main "$@"
echo "runtest.sh complete!"