ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Pierre Vaudrey <>
Subject Ant & JUnit
Date Fri, 28 Jun 2002 21:27:43 GMT
I'm new to Ant and new to the list :

I use Ant on Mac OSX downloaded via fink in /sw/lib/
I'm trying to run a buildfile including JUnit with failed result :
     [mkdir] Created dir: /Users/pierreva/Desktop/jtestcase/example/lib
     [javac] Compiling 2 source files to 
     [mkdir] Created dir: 


/Users/pierreva/Desktop/jtestcase/build.xml:77: Could not create task of 
type: junit. Common solutions are to use taskdef to declare your task, 
or, if this is an optional task, to put the optional.jar in the lib 
directory of your ant installation (ANT_HOME).
The Target "test" is :
<target name="test" depends="dist">
     <mkdir dir="${}"/>
     <!-- Compile the testing code from ${test.src} into ${} -->
     <javac srcdir="${test.src}" destdir="${}" debug="on" 
deprecation="on" excludes="">
       <classpath path="${build}"/>
       <classpath path="${common-classpath}"/>
     <mkdir dir="${}"/>
     <junit printsummary="yes" haltonfailure="no">
       <classpath path="${common-classpath}"/>
       <classpath path="${}"/>
       <classpath path="${test.src}/data"/>
       <classpath path="${build}"/>
       <formatter type="plain" />
       <batchtest fork="yes" todir="${}"
         <fileset dir="${test.src}">
           <include name="**/tests/*.java" />
           <exclude name="**/*" />
     <antcall target="testfailure"/>
Where is the place of  junit.jar ?

Pierre Vaudrey

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

View raw message