bodewig     2004/06/02 05:31:18

  Modified:    docs     faq.html
               docs/manual/OptionalTasks junitreport.html
               src/main/org/apache/tools/ant/taskdefs/optional/junit
                        XalanExecutor.java
               xdocs    faq.xml
  Log:
  Document the <junitreport>/JDK 1.5 problem, PR: 27541
  
  Revision  Changes    Path
  1.99      +21 -0     ant/docs/faq.html
  
  Index: faq.html
  ===================================================================
  RCS file: /home/cvs/ant/docs/faq.html,v
  retrieving revision 1.98
  retrieving revision 1.99
  diff -u -r1.98 -r1.99
  --- faq.html  11 May 2004 16:37:02 -0000      1.98
  +++ faq.html  2 Jun 2004 12:31:17 -0000       1.99
  @@ -357,6 +357,12 @@
           <code>NoClassDefFoundError</code> if forked.
         
         </a></li>
  +                <li><a href="#xalan-jdk1.5">
  +  
  +        <code>&lt;junitreport&gt;</code> doesn't work with JDK 1.5 but
  +        worked fine with JDK 1.4.
  +      
  +      </a></li>
               </ul>
       
         <h3 class="section">Answers</h3>
  @@ -1674,6 +1680,21 @@
   &lt;pathelement 
path=&quot;${ant.home}/lib/xml-apis.jar:${ant.home}/lib/xercesImpl.jar&quot;/&gt;
   </pre>
                           <p>to your task's &lt;classpath&gt;.</p>
  +                    <p class="faq">
  +      <a name="xalan-jdk1.5"></a>
  +      
  +        <code>&lt;junitreport&gt;</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>
   
  
  
  
  1.13      +11 -5     ant/docs/manual/OptionalTasks/junitreport.html
  
  Index: junitreport.html
  ===================================================================
  RCS file: /home/cvs/ant/docs/manual/OptionalTasks/junitreport.html,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- junitreport.html  9 Feb 2004 21:50:08 -0000       1.12
  +++ junitreport.html  2 Jun 2004 12:31:18 -0000       1.13
  @@ -14,11 +14,17 @@
   Library Dependencies</a> for more information.</p>
   
   <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>
   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.
  
  
  
  1.15      +12 -2     
ant/src/main/org/apache/tools/ant/taskdefs/optional/junit/XalanExecutor.java
  
  Index: XalanExecutor.java
  ===================================================================
  RCS file: 
/home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/optional/junit/XalanExecutor.java,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- XalanExecutor.java        9 Feb 2004 21:05:32 -0000       1.14
  +++ XalanExecutor.java        2 Jun 2004 12:31:18 -0000       1.15
  @@ -27,6 +27,7 @@
   import java.lang.reflect.Field;
   import org.apache.tools.ant.BuildException;
   import org.apache.tools.ant.Project;
  +import org.apache.tools.ant.util.JavaEnvUtils;
   
   /**
    * Command class that encapsulate specific behavior for each
  @@ -86,8 +87,17 @@
                   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 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);
  
  
  
  1.55      +23 -0     ant/xdocs/faq.xml
  
  Index: faq.xml
  ===================================================================
  RCS file: /home/cvs/ant/xdocs/faq.xml,v
  retrieving revision 1.54
  retrieving revision 1.55
  diff -u -r1.54 -r1.55
  --- faq.xml   11 May 2004 16:37:02 -0000      1.54
  +++ faq.xml   2 Jun 2004 12:31:18 -0000       1.55
  @@ -1490,6 +1490,29 @@
   
         </answer>
       </faq>
  +
  +    <faq id="xalan-jdk1.5">
  +      <question>
  +        <code>&lt;junitreport&gt;</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>
   
   </document>
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to