ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Emerson Cargnin - MSA <emers...@sicredi.com.br>
Subject Re: Ant & JUnit
Date Fri, 28 Jun 2002 21:42:38 GMT
did you put the junit.jar in the classpath????

Pierre Vaudrey wrote:

> 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 :
> .......
> test:
>     [mkdir] Created dir: /Users/pierreva/Desktop/jtestcase/example/lib
>     [javac] Compiling 2 source files to 
> /Users/pierreva/Desktop/jtestcase/example/lib
>     [mkdir] Created dir: 
> /Users/pierreva/Desktop/jtestcase/example/testreport
> 
> BUILD FAILED
> 
> /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="${test.build}"/>
>     <!-- Compile the testing code from ${test.src} into ${test.build} -->
>     <javac srcdir="${test.src}" destdir="${test.build}" debug="on" 
> deprecation="on" excludes="">
>       <classpath path="${build}"/>
>       <classpath path="${common-classpath}"/>
>     </javac>
>     <mkdir dir="${test.report}"/>
>     <junit printsummary="yes" haltonfailure="no">
>       <classpath path="${common-classpath}"/>
>       <classpath path="${test.build}"/>
>       <classpath path="${test.src}/data"/>
>       <classpath path="${build}"/>
>       <formatter type="plain" />
>       <batchtest fork="yes" todir="${test.report}"
>                  failureProperty="testfailed">
>         <fileset dir="${test.src}">
>           <include name="**/tests/*.java" />
>           <exclude name="**/*AllTest.java" />
>         </fileset>
>       </batchtest>
>     </junit>
>     <antcall target="testfailure"/>
>   </target>
> Where is the place of  junit.jar ?
> 
> Pierre Vaudrey
> email pierre.vaudrey@wanadoo.fr
> 
> 
> -- 
> To unsubscribe, e-mail:   <mailto:ant-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>
> 



--
To unsubscribe, e-mail:   <mailto:ant-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>


Mime
View raw message