ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Geng, Bo (Bob)" <>
Subject Could not create task of type: junitreport!?
Date Wed, 13 Mar 2002 05:16:38 GMT
I had put the optional.jar int the lib directory of my ANT_HOME. But when I
tried to use the junitreport task, there was an error:

helloWorld\build.xml:93: Could not create task of type: junitreport. 
Common solutions are to use taskdef to declare your task, or, if this is an
optional task, to put the optional.jar in the lib directory of your ant
installation (ANT_HOME).

The following is part of build.xml for unit test:

    <target name="test" depends="init" description="Run unit tests">
        <delete dir="${junit.results}"/>
        <mkdir dir="${junit.results}"/>
        <echo message="Running unit tests..."/>
        <junit fork="yes" haltonfailure="yes">
                <path refid="classpath"/>
                <pathelement location="${build.dir}"/>
            <formatter type="brief" usefile="false"/>
            <formatter type="xml"/>
            <batchtest todir="${junit.results}">
                <fileset dir="${build.dir}" includes="**/*Test.class"/>
	<junitreport todir="${junit.results}">
  		<fileset dir="${junit.results}">
    			<include name="TEST-*.xml"/>
  		<report format="frames" todir="${junit.results}"/>

Anybody who can tell me what's the problem?


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

View raw message