ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jimmy Han" <>
Subject junit problem
Date Tue, 15 Jul 2003 23:00:25 GMT
I know this has been asked for manu times. I have read these replies in
the archieve. But I still could not fix the problem. Help is really needed.

I am using Windows2000.
I installed junit to my d:\junit3.8.1, and created a build.xml files like

D:\junit3.8.1>type build.xml
<?xml version="1.0"?>

<project basedir="." default="test">

<property name="classes" value="." />
<property name="" value="junit.samples.AllTests" />

<path id="test.classpath">
  <pathelement location="${classes}" />
  <pathelement location="./junit.jar" />

<target name="test">
  <junit fork="yes" haltonfailure="yes">
    <test name="${}" />
    <formatter type="plain" usefile="false" />
    <classpath refid="test.classpath" />

I copied junit.jar to my %ANT_HOME%\lib directory

D:\junit3.8.1>env | grep ANT

D:\junit3.8.1>cd \jwsdp-1.2\apache-ant\lib

 Volume in drive D is DATA
 Volume Serial Number is 60C0-2B06

 Directory of D:\jwsdp-1.2\apache-ant\lib

07/14/2003  12:24p      <DIR>          .
07/14/2003  12:24p      <DIR>          ..
05/30/2003  05:53a             735,451 ant.jar
09/04/2002  11:29p             121,070 junit.jar
05/30/2003  05:54a             424,231 optional.jar
               3 File(s)      1,280,752 bytes

When I run ant test, I still got that error:
D:\jwsdp-1.2\apache-ant\lib>cd \junit3.8.1

D:\junit3.8.1>which ant

D:\junit3.8.1>ant test
Buildfile: build.xml


file:D:/junit3.8.1/build.xml:14: Could not create task or type of type:

Ant could not find the task or a class this task relies upon.

This is common and has a number of causes; the usual
solutions are to read the manual pages then download and
install needed JAR files, or fix the build file:
 - You have misspelt 'junit'.
   Fix: check your spelling.
 - The task needs an external JAR file to execute

Any idea?


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

View raw message