git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@276504 13f79535-47bb-0310-9956-ffa450edef68master
| @@ -356,6 +356,12 @@ | |||||
| Using format="xml", <junit> fails with a | Using format="xml", <junit> fails with a | ||||
| <code>NoClassDefFoundError</code> if forked. | <code>NoClassDefFoundError</code> if forked. | ||||
| </a></li> | |||||
| <li><a href="#xalan-jdk1.5"> | |||||
| <code><junitreport></code> doesn't work with JDK 1.5 but | |||||
| worked fine with JDK 1.4. | |||||
| </a></li> | </a></li> | ||||
| </ul> | </ul> | ||||
| @@ -1674,6 +1680,21 @@ mv /tmp/foo $ANT_HOME/bin/antRun | |||||
| <pathelement path="${ant.home}/lib/xml-apis.jar:${ant.home}/lib/xercesImpl.jar"/> | <pathelement path="${ant.home}/lib/xml-apis.jar:${ant.home}/lib/xercesImpl.jar"/> | ||||
| </pre> | </pre> | ||||
| <p>to your task's <classpath>.</p> | <p>to your task's <classpath>.</p> | ||||
| <p class="faq"> | |||||
| <a name="xalan-jdk1.5"></a> | |||||
| <code><junitreport></code> doesn't work with JDK 1.5 but | |||||
| worked fine with JDK 1.4. | |||||
| </p> | |||||
| <p>While JDK 1.4.x contains a version of Xalan-J 2, JDK 1.5 | |||||
| (and later?) have <a href="http://java.sun.com/j2se/1.5.0/compatibility.html#4959783">moved | |||||
| to XSLTC</a>. Since this task uses Xalan's redirect | |||||
| extensions for its internal stylesheet, Ant doesn't support | |||||
| XSLTC yet. This means that you have to install <a href="http://xml.apache.org/xalan-j/">Xalan-J 2</a> in order | |||||
| to use this task with JDK 1.5.</p> | |||||
| <p>If you want to follow progress on this, <a href="http://issues.apache.org/bugzilla/show_bug.cgi?id=27541">here</a> | |||||
| is the relevant bug report.</p> | |||||
| </div> | </div> | ||||
| </div> | </div> | ||||
| @@ -14,11 +14,17 @@ the Ant distribution. See <a href="../install.html#librarydependencies"> | |||||
| Library Dependencies</a> for more information.</p> | Library Dependencies</a> for more information.</p> | ||||
| <h3>Requirements</h3> | <h3>Requirements</h3> | ||||
| <p>The task needs <a href="http://xml.apache.org/xalan-j/">Xalan 2.x</a>; | |||||
| although | |||||
| <a href="http://xml.apache.org/dist/xalan-j/old/xalan-j_1_2_2.zip">Xalan 1.2.2</a> | |||||
| does work, but as Xalan1 is not supported, we do not recommend this. | |||||
| </p> | |||||
| <p>The task needs <a href="http://xml.apache.org/xalan-j/">Xalan | |||||
| 2.x</a>; although <a | |||||
| href="http://xml.apache.org/dist/xalan-j/old/xalan-j_1_2_2.zip">Xalan | |||||
| 1.2.2</a> does work, but as Xalan1 is not supported, we do not | |||||
| recommend this. While JDK 1.4.x contains a version of Xalan-J 2, JDK | |||||
| 1.5 and later have <a | |||||
| href="http://java.sun.com/j2se/1.5.0/compatibility.html#4959783">moved | |||||
| to XSLTC</a>. Since this task uses Xalan's redirect extensions for | |||||
| its internal stylesheet, Ant doesn't support XSLTC yet. This means | |||||
| that you have to install Xalan-J 2 in order to use this task with JDK | |||||
| 1.5.</p> | |||||
| <p> | <p> | ||||
| If you do you use Xalan 1.2.2 you will need a compatible (older) version of Xerces. | If you do you use Xalan 1.2.2 you will need a compatible (older) version of Xerces. | ||||
| as well as BSF(bsf.jar). Again, using Xalan 2 is simpler and supported. | as well as BSF(bsf.jar). Again, using Xalan 2 is simpler and supported. | ||||
| @@ -27,6 +27,7 @@ import java.io.StringWriter; | |||||
| import java.lang.reflect.Field; | import java.lang.reflect.Field; | ||||
| import org.apache.tools.ant.BuildException; | import org.apache.tools.ant.BuildException; | ||||
| import org.apache.tools.ant.Project; | import org.apache.tools.ant.Project; | ||||
| import org.apache.tools.ant.util.JavaEnvUtils; | |||||
| /** | /** | ||||
| * Command class that encapsulate specific behavior for each | * Command class that encapsulate specific behavior for each | ||||
| @@ -86,8 +87,17 @@ abstract class XalanExecutor { | |||||
| xalan1missing.printStackTrace(new PrintWriter(swr)); | xalan1missing.printStackTrace(new PrintWriter(swr)); | ||||
| caller.task.log("Didn't find Xalan1.", Project.MSG_DEBUG); | caller.task.log("Didn't find Xalan1.", Project.MSG_DEBUG); | ||||
| caller.task.log(swr.toString(), 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 msg = "Could not find xalan2 nor xalan1 " | |||||
| + "in the classpath. Check http://xml.apache.org/xalan-j/"; | |||||
| if (!JavaEnvUtils.isJavaVersion(JavaEnvUtils.JAVA_1_1) | |||||
| && !JavaEnvUtils.isJavaVersion(JavaEnvUtils.JAVA_1_2) | |||||
| && !JavaEnvUtils.isJavaVersion(JavaEnvUtils.JAVA_1_3) | |||||
| && !JavaEnvUtils.isJavaVersion(JavaEnvUtils.JAVA_1_4)) { | |||||
| msg += "\r\nStarting with JDK 1.5, the built-in processor " | |||||
| + "of the JDK is no longer Xalan\r\nbut XSLTC which is " | |||||
| + "not (yet) supported by the junitreport task."; | |||||
| } | |||||
| throw new BuildException(msg); | |||||
| } | } | ||||
| } | } | ||||
| String version = getXalanVersion(procVersion); | String version = getXalanVersion(procVersion); | ||||
| @@ -1490,6 +1490,29 @@ mv /tmp/foo $ANT_HOME/bin/antRun | |||||
| </answer> | </answer> | ||||
| </faq> | </faq> | ||||
| <faq id="xalan-jdk1.5"> | |||||
| <question> | |||||
| <code><junitreport></code> doesn't work with JDK 1.5 but | |||||
| worked fine with JDK 1.4. | |||||
| </question> | |||||
| <answer> | |||||
| <p>While JDK 1.4.x contains a version of Xalan-J 2, JDK 1.5 | |||||
| (and later?) have <a | |||||
| href="http://java.sun.com/j2se/1.5.0/compatibility.html#4959783">moved | |||||
| to XSLTC</a>. Since this task uses Xalan's redirect | |||||
| extensions for its internal stylesheet, Ant doesn't support | |||||
| XSLTC yet. This means that you have to install <a | |||||
| href="http://xml.apache.org/xalan-j/">Xalan-J 2</a> in order | |||||
| to use this task with JDK 1.5.</p> | |||||
| <p>If you want to follow progress on this, <a | |||||
| href="http://issues.apache.org/bugzilla/show_bug.cgi?id=27541">here</a> | |||||
| is the relevant bug report.</p> | |||||
| </answer> | |||||
| </faq> | |||||
| </faqsection> | </faqsection> | ||||
| </document> | </document> | ||||