There seems to be multiple problems surrounding JUnit 3.5 and Ant 1.3.
The way that I fixed this problem was to:

        a.) Put the optional jakarta-ant-1.3-optional.jar in my $ANT_HOME/lib
        b.) Define a <taskdef> statement for JUnit with a <classpath> set for
the <taskdef>.

Good Luck,
Denny

Alexander Woodroffe wrote:
> 
> Hi All
> 
>     I am a new to Ant and relativley new to Java, and I have been
> experiencing a few problems with the JUnit optional task. I have upto now
> been using Ant 1.2 with the current optional jar along with JUnit3.5 to run
> my Unit tests.
> However I would now like to move to Ant 1.3 so that I can make use of some
> of the new optional tasks. The problem is that I get a class definition
> exception. I'm a bit lost at this, as ant managed to locate the actual JUnit
> task in the optional jar which is in the same package.
> 
> compile-test:
> 
> test:
>     [junit] Running com.netdecisions.frameworks.AllTests
>     [junit] java.lang.NoClassDefFoundError:
> org/apache/tools/ant/taskdefs/optional/junit/JUnitTestRunner
>     [junit] TEST com.netdecisions.frameworks.AllTests FAILED
> 
> BUILD SUCCESSFUL
> 
> Thanks in advance Alex
> 

-- 
Denny Chambers
Linux Java Engineer
Connex, Inc
Voice: 770-455-7653
Fax: 770-455-7325

Reply via email to