This problem is similar to John Hohlen (1/6/2004) "Can't Run JUnits With ANT
1.6"

I check Antoine's reply, however no luck.

Here are my findings:

I am in the process of migrating build scripts from ANT 1.5.4 to 1.6.  The
migration
has gone relatively smooth until, I execute a target that has JUnit task I
get the following error:

    [junit] Exception in thread "main" java.lang.VerifyError: (class:
org/apache/tools/ant/taskdefs/optional/junit/FormatterElement, method:
shouldUse signature: (Lorg/apache/tools/ant/Task;)Z) Incompatible object
argument for function call
    [junit]     at
org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.createAndStoreF
ormatter(JUnitTestRunner.java:578)
    [junit]     at
org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(JUnitTestR
unner.java:531)


Here is the junit task that is failing in my build.xml file:

<junit haltonfailure="false"
       printsummary="false"
       fork="on"
       errorProperty="test.failed"
       showoutput="true"
       dir="${env.DEVROOT}/test">
    <classpath refid="test.classpath"/>
    <sysproperty key="oll.config.file"
value="${env.DEVROOT}/properties/oll.properties.${env.USER}"/>
    <sysproperty key="LOGPROPERTIESFILE"
value="${env.DEVROOT}/properties/log4j.properties"/>
    <sysproperty key="MAINLOGFILE" value="main.log"/>
    <formatter type="brief" usefile="false"/>
    <formatter type="xml"/>
    <batchtest todir="${test.data.dir}">
       <fileset dir="${build.dir}" includes="**/Test*.class"/>
    </batchtest>
</junit>

If I turn the forking off and comment out the line <formatter type="xml"/>
it works.  However, this
still does not fix the core problem.  If anyone has any suggestions or
solutions to fixing the problem
or work around, it would be greatly appreciated.

Moses


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to