ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Aaron Kamienski <aar...@snaptwo.com>
Subject Re: [POLL] JUnit Users
Date Thu, 12 Jul 2001 13:27:21 GMT
Stephane Bailliez wrote:

> - Are you using the framed report ? non framed report ? both ?

The framed report.

> - Did you customize the stylesheets ?

I thought about it... but, no.

> - What are your RFEs for <junitreport> ?

I had asked about this previously on the list but got no reply.
It seems (to me) to be a problem with the design, so if that's being
reworked, there might be hope...

I would like to be able to only do the report if Xalan is available.
I currently can do this as long as I don't include a <report>
sub-element like so:

  <target name="init">
    <!-- Xalan (XSLT Processor) available -->
    <available classname="org.apache.xalan.xslt.XSLTProcessor"
               classpath="${CLASSPATH}"
               property="xalan-present"/>
  </target>

  <target name="junitreport" depends="init" if="xalan-present">
    <junitreport/>
  </target>

But if I add a <report/> then Xalan appears to be required even if only
parsing the buildfile:

  <target name="junitreport" depends="init" if="xalan-present">
    <junitreport>
      <report/>
    </junitreport>
  </target>

This can be shown simply by running "-projecthelp"!  The following
error is produced:

D:\SNAP2\ack2.xml:12: java.lang.NoClassDefFoundError: org/apache/xalan/xslt/XSLTInputSource
--- Nested Exception ---
java.lang.NoClassDefFoundError: org/apache/xalan/xslt/XSLTInputSource
        at org.apache.tools.ant.taskdefs.optional.junit.XMLResultAggregator.createReport(XMLResultAggregator.java:114)
        at java.lang.reflect.Method.invoke(Native Method)
        at org.apache.tools.ant.IntrospectionHelper$1.create(IntrospectionHelper.java:167)
        at org.apache.tools.ant.IntrospectionHelper.createElement(IntrospectionHelper.java:275)
        at org.apache.tools.ant.ProjectHelper$NestedElementHandler.init(ProjectHelper.java:535)
        at org.apache.tools.ant.ProjectHelper$TaskHandler.startElement(ProjectHelper.java:499)
        at org.apache.xerces.parsers.SAXParser.startElement(SAXParser.java:1335)
...

The solution that I came up with was to put the junitreport
in a sub-buildfile that is only called if Xalan is present.

ajk

-- 
Aaron Kamienski <aaronk@snaptwo.com>
SNAP2 Corporation

Mime
View raw message