ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gary Lawrence Murphy <>
Subject Re: tutorials on junitreport?
Date Thu, 17 Jan 2002 16:51:04 GMT
>>>>> "E" == Erik Hatcher <> writes:

    E> Why thank you! :) <junitreport> works fine in Ant 1.4.1 and all
    E> the stuff developed for that article is rolled into 1.4.1
    E> (article was written for 1.3).

Indeed I'll second that opinion, it's an excellent article; I interpreted
the jar file to mean placing the mail, activation and junitmail jar files
under /usr/share/ant/lib ($ANT_HOME/lib) and the XSL under $ANTHOME/etc/xsl

my problem is with the earlier junitreport stage:

    E> Can you give us more details of the problems you're having with
    E> it?

Thanks for the kind offer; this stuff is just too important not to wrap
my head around it and your help is greatly appreciated.

What I get are the ${Reports}/TEST-*.xml files and then the dreaded

    [junit] Tests run: 23, Failures: 0, Errors: 0, Time elapsed: 7.16 sec


    /home/garym/dev/cbc/sports/sportwire/Util/build.xml:96: Could not
    create task of type: junitreport...

I am using xalan-2.2.0-dev.jar and I have target that reads as follows
(line 96 is the start of the junitreport element:

    <target name="test" depends="jar"
        description="Run JUnit tests for current SportWire package">
    <jar jarfile="${Jardir}/test${COMPONENT}.jar"
    <mkdir dir="${Reports}"/>
    <junit printsummary="yes" haltonfailure="yes">
               <formatter type="xml"/>
               <pathelement location="${Jardir}/test${COMPONENT}.jar"/>
               <pathelement location="${Jardir}/${COMPONENT}.jar"/>
               <pathelement location="${Foreign}/log4j.jar"/>
               <pathelement location="${Foreign}/commons.jar"/>
               <pathelement location="${Foreign}/junit.jar"/>
               <pathelement location="${Foreign}/xalan.jar"/>
               <pathelement location="${Foreign}/xerces.jar"/>
               <pathelement location="${Foreign}/jdbc7.0-1.2.jar"/>

           <batchtest fork="yes" todir="${Reports}">
               <fileset dir="${CLASSES}">
                   <include name="**/Test*.class"/>

           <mkdir dir="${Reports}"/> <!-- also tried without this line -->
           <fileset dir="${Reports}">
               <include name="TEST-*.xml"/>
           <report format="noframes" 

For extra measure, here's some highlights from the -debug -verbose
output, selected by someone who hasn't a clue what they are doing ;)

Detected Java version: 1.3 in: /opt/jdk/jre
Detected OS: Linux
Setting project property: java.fullversion -> J2RE 1.3.0 IBM build cx130-20010925 (JIT
enabled: jitc)
Setting ro project property: ant.version -> Ant version 1.4.1 compiled on November 20 2001
 +User task: junit

this indicates the optional unit is present, but the stderr ends with the
stack trace fragment:

    at    at

and my ant-optional-1.4.1.jar does not have any classes with junitreport
in the name ... which leads me to suspect there is something I don't have
or something I need to write -- I am using a binary RPM ant-1.4.1-1 from

Gary Lawrence Murphy <> TeleDynamics Communications Inc
What happens on Groundhog Day?
"There are many things which do not concern the process" --- Joan of Arc

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message