ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Diane Holt <hol...@yahoo.com>
Subject Re: Junit task
Date Thu, 11 Oct 2001 18:25:42 GMT
--- Sebastien Chassande-Barrioz <sebastien.chassande@inrialpes.fr> wrote:
> I have the following error when I use the optional junit task:
> 
> Could not create task of type: junit due to 
> java.lang.NoClassDefFoundError: junit/framework/TestListener
> 
> In my build.xml I define the task as this:
> 
> <taskdef name="junit" 
> classname="org.apache.tools.ant.taskdefs.optional.junit.JUnitTask"/>
> 
> I tried to specify a classpath with the junit jar as this:
> 
> <taskdef name="junit"
>    classname="org.apache.tools.ant.taskdefs.optional.junit.JUnitTask">
>    <classpath>
>       <pathelement path="${externals.dir}/junit3_5.jar"/>
>    </classpath>
> </taskdef>
> 
> but I have already the same problem. Do you have an idea of my problem?

You don't want to include the Junit jar-file in a <classpath> for your
<taskdef> -- that's used for finding the classname you're pointing to for
the task you're defining. Since you don't have the Junit jar-file in
$ANT_HOME/lib, you'll need to include it in your CLASSPATH.

Diane

=====
(holtdl@yahoo.com)



__________________________________________________
Do You Yahoo!?
Make a great connection at Yahoo! Personals.
http://personals.yahoo.com

Mime
View raw message