you need to either cpoy junit.jar to $MAVEN_HOME/lib which is what you
usually have to do for Ant - I don't recommend this. Instead, declare
a dependency on junit like this:
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<properties>
<classloader>root</classloader>
</properties>
</dependency>
On 5/19/05, Alain MAHIER <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I have trouble when calling ant tasks executing junit tests from maven. Are
> there any known issues about this problem ?
>
> ANT BUILD FILE
>
> <target name="runTests">
> <mkdir dir="target/test-results"/>
> <junit printsummary="true" showoutput="true">
> <classpath>
> <pathelement location="${classes.dir}"/>
> <pathelement
> location="${maven.repo.local}/log4j/jars/log4j-1.2.8.jar"/>
> <pathelement
> location="${maven.repo.local}/commons-lang/jars/commons-lang-2.0.jar"/>
> </classpath>
> <batchtest todir="target/test-results">
> <formatter type="xml"/>
> <fileset dir="${classes.dir}">
> <include name="**/*Test.class"/>
> </fileset>
> </batchtest>
> </junit>
> </target>
>
> MAVEN FILE
>
> <goal name="callRunTests">
> <ant:ant antfile="${basedir}/build/build.xml"
> target="runTests"/>
> </goal>
>
> When executing maven callRunTests, ant tells me he cannot find junit task ?
> Do you know why ?
>
> Thanks you in advance
> Alain MAHIER
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]