ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeff Turner <j...@socialchange.net.au>
Subject taskdef'ing junit
Date Sun, 18 Nov 2001 06:15:39 GMT
Hi,

I'm trying to use <taskdef> to define the <junit> task, so I don't have
to require all users to copy junit.jar to the $ANT_HOME/lib.

I currently have:

<project name="test_taskdef" default="main" basedir=".">
    <property name="build.sysclasspath" value="ignore"/>

    <target name="main">
        <echo>Using jar ${ant.home}/lib/optional.jar</echo>
        <taskdef name="junit" classname="org.apache.tools.ant.taskdefs.optional.junit.JUnitTask">
            <classpath>
                <pathelement location="${ant.home}/lib/optional.jar"/>
            </classpath>
        </taskdef>
    </target>
</project>

I get the error:

/home/jeff/tmp/java/ant/taskdef/build.xml:8: taskdef class org.apache.tools.ant.taskdefs.optional.junit.JUnitTask
cannot be found

I've verified that ${ant.home}/lib/optional.jar exists and contains that class.
Should this be possible? I've tested with Ant 1.4 and the latest from CVS.

thanks,


--Jeff

--
To unsubscribe, e-mail:   <mailto:ant-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>


Mime
View raw message