Browse Source

More Xerces upgrade changes, better debug output for JUnitReport

git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@273906 13f79535-47bb-0310-9956-ffa450edef68
master
Stefan Bodewig 22 years ago
parent
commit
4ee134e627
3 changed files with 17 additions and 6 deletions
  1. +1
    -1
      docs/manual/install.html
  2. +3
    -3
      docs/manual/platform.html
  3. +13
    -2
      src/main/org/apache/tools/ant/taskdefs/optional/junit/XalanExecutor.java

+ 1
- 1
docs/manual/install.html View File

@@ -44,7 +44,7 @@ Please see
<a href="http://java.sun.com/xml/" target="_top">http://java.sun.com/xml/</a>
for more information about JAXP.
If you wish to use a different JAXP-compliant parser, you should remove
<code>xercesImpl.jar</code> and <code>xmlParserAPIs.jar</code>
<code>xercesImpl.jar</code> and <code>xml-apis.jar</code>
from Ant's <code>lib</code> directory.

You can then either put the jars from your preferred parser into Ant's


+ 3
- 3
docs/manual/platform.html View File

@@ -50,7 +50,7 @@ it is treated like any other Unix.
<p>To give the same level of sophisticated control as Ant's startup scripts on other platforms, it was decided to make the main ant startup on NetWare be via a Perl Script, "runant.pl". This is found in the bin directory (for instance - bootstrap\bin or dist\bin).</p>

<p>One important item of note is that you need to set up the following to run ant:</p>
<ul><li><code>CLASSPATH</code> - put ant.jar, xercesImpl.jar, xmlParserAPIs.jar and any other needed jars on the system classpath.</li>
<ul><li><code>CLASSPATH</code> - put ant.jar, xercesImpl.jar, xml-apis.jar and any other needed jars on the system classpath.</li>
<li><code>ANT_OPTS</code> - On NetWare, <code>ANT_OPTS</code> needs to include a parameter of the form, <nobr>"-envCWD=<code>ANT_HOME</code>"</nobr>, with <code>ANT_HOME</code> being the fully expanded location of Ant, <b>not</b> an environment variable. This is due to the fact that the NetWare System Console has no notion of a current working directory.</li>
</ul>
<p>It is suggested that you create up an ant.ncf that sets up these parameters, and calls <code>perl ANT_HOME/dist/bin/runant.pl</code></p>
@@ -58,7 +58,7 @@ it is treated like any other Unix.
<code>
&nbsp;&nbsp;&nbsp;envset CLASSPATH=SYS:/jakarta-ant/bootstrap/lib/ant.jar<br />
&nbsp;&nbsp;&nbsp;envset CLASSPATH=$CLASSPATH;SYS:/jakarta-ant/lib/xercesImpl.jar <br />
&nbsp;&nbsp;&nbsp;envset CLASSPATH=$CLASSPATH;SYS:/jakarta-ant/lib/xmlParserAPIs.jar <br />
&nbsp;&nbsp;&nbsp;envset CLASSPATH=$CLASSPATH;SYS:/jakarta-ant/lib/xml-apis.jar <br />
&nbsp;&nbsp;&nbsp;envset CLASSPATH=$CLASSPATH;SYS:/jakarta-ant/lib/optional/junit.jar <br />
&nbsp;&nbsp;&nbsp;envset CLASSPATH=$CLASSPATH;SYS:/jakarta-ant/bootstrap/lib/optional.jar <br />
<br />
@@ -80,6 +80,6 @@ techniques to hide platform details from build files need to be written and
tested on every particular platform. Contributions in this area are welcome.

<hr>
<p align="center">Copyright &copy; 2002 Apache Software Foundation. All rights
<p align="center">Copyright &copy; 2002-2003 Apache Software Foundation. All rights
Reserved.</p>
</html>

+ 13
- 2
src/main/org/apache/tools/ant/taskdefs/optional/junit/XalanExecutor.java View File

@@ -1,7 +1,7 @@
/*
* The Apache Software License, Version 1.1
*
* Copyright (c) 2001-2002 The Apache Software Foundation. All rights
* Copyright (c) 2001-2003 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -58,8 +58,11 @@ import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.io.StringWriter;
import java.lang.reflect.Field;
import org.apache.tools.ant.BuildException;
import org.apache.tools.ant.Project;

/**
* Command class that encapsulate specific behavior for each
@@ -106,12 +109,20 @@ abstract class XalanExecutor {
executor = (XalanExecutor) Class.forName(
"org.apache.tools.ant.taskdefs.optional.junit.Xalan2Executor").newInstance();
} catch (Exception xalan2missing){
StringWriter swr = new StringWriter();
xalan2missing.printStackTrace(new PrintWriter(swr));
caller.task.log("Didn't find Xalan2.", Project.MSG_DEBUG);
caller.task.log(swr.toString(), Project.MSG_DEBUG);
try {
procVersion = Class.forName("org.apache.xalan.xslt.XSLProcessorVersion");
executor = (XalanExecutor) Class.forName(
"org.apache.tools.ant.taskdefs.optional.junit.Xalan1Executor").newInstance();
} catch (Exception xalan1missing){
throw new BuildException("Could not find xalan2 nor xalan1 in the classpath. Check http://xml.apache.org/xalan-j/");
swr = new StringWriter();
xalan1missing.printStackTrace(new PrintWriter(swr));
caller.task.log("Didn't find Xalan1.", Project.MSG_DEBUG);
caller.task.log(swr.toString(), Project.MSG_DEBUG);
throw new BuildException("Could not find xalan2 nor xalan1 in the classpath. Check http://xml.apache.org/xalan-j");
}
}
String version = getXalanVersion(procVersion);


Loading…
Cancel
Save