ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Robert Leftwich <digi...@ix.net.au>
Subject Re: Using the JUnit optional task
Date Wed, 09 May 2001 00:37:38 GMT
At 04:55 PM 08-05-01 -0600, Mike McGowan wrote:
>I'm trying to define a Junit task.  The start of my build file looks like
>this:
>
><project name="util" default="main" basedir=".">
>         <taskdef name="junit"
>classname="org.apache.tools.ant.taskdefs.junit.JUnitTask"/>
>         <target name="main" depends="properties, bat, sh">
>
>I have jakarta-ant-1.3-optional.jar in my class path.
>
>I can't get beyond...
>
>F:\Mainline\univ\java\src\com\lawson\rdtech\xml\util\build.xml:4: taskdef
>class org.apache.tools.ant.taskdefs.junit.JUnitTask cannot
>  be found
>java.lang.ClassNotFoundException:
>org.apache.tools.ant.taskdefs.junit.JUnitTask

In my (1.3) optional jar the class is named 
org.apache.tools.ant.taskdefs.optional.junit.JUnitTask - you could try that 
as the classname or you might be better off to copy the jar to the ant/lib 
directory which will allow you to use junit (and the other optional tasks) 
without declaring them using taskdef.

HTH

Robert


Mime
View raw message