You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by "Hohlen, John C" <Jo...@erac.com> on 2004/01/05 14:02:52 UTC
Can't Run JUnits With ANT 1.6
I'm currently migrating from ANT 1.5.4 to ANT 1.6. However, whenever I try to run the JUnit task, I'm encountering a "VerifyError". More specifically:
[junit] java.lang.VerifyError: (class: org/apache/tools/ant/taskdefs/optional/junit/FormatterEle
ment, 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.createAndStoreFormat
ter(JUnitTestRunner.java:578)
[junit] at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(JUnitTestRunner
.java:531)
[junit] Exception in thread "main"
Any thoughts one what my issue could be?
Thanks,
JOHN
P.S. Here is the sniplet from my build.xml:
<target name="run.ut" depends="compile.ut"
description="Run all unit tests, printing to xml file (for report).">
<delete dir="${unittest.results}"/>
<mkdir dir="${unittest.results}"/>
<junit printsummary="yes" fork="yes" dir="${build.home}" failureproperty="junit.failure">
<sysproperty key="unittest_src" value="${unittest.src}"/>
<classpath refid="fleetsystems.classpath"/>
<formatter type="xml"/>
<batchtest fork="yes"
todir="${unittest.results}">
<fileset dir="${unittest.src}">
<include name="**/*Test.java"/>
<include name="**/UT_*.java"/>
<exclude name="**/testutils/**"/>
</fileset>
</batchtest>
</junit>
</target>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org
Re: Can't Run JUnits With ANT 1.6
Posted by Antoine Lévy-Lambert <an...@antbuild.com>.
Hohlen, John C wrote:
>I'm currently migrating from ANT 1.5.4 to ANT 1.6. However, whenever I try to run the JUnit task, I'm encountering a "VerifyError". More specifically:
>
> [junit] java.lang.VerifyError: (class: org/apache/tools/ant/taskdefs/optional/junit/FormatterEle
>ment, 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.createAndStoreFormat
>ter(JUnitTestRunner.java:578)
> [junit] at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(JUnitTestRunner
>.java:531)
> [junit] Exception in thread "main"
>
>Any thoughts one what my issue could be?
>
>
>
Hi John,
This sounds like a conflict between different ant versions in your
classpath. Can it be that you still have $ANT_HOME/lib/optional.jar in
your installation (from ant 1.5.4) ?
Do you also have some ant classes in fleetsystems.classpath ?
Cheers,
Antoine
>Thanks,
>
>JOHN
>
>P.S. Here is the sniplet from my build.xml:
>
>
> <target name="run.ut" depends="compile.ut"
> description="Run all unit tests, printing to xml file (for report).">
> <delete dir="${unittest.results}"/>
> <mkdir dir="${unittest.results}"/>
> <junit printsummary="yes" fork="yes" dir="${build.home}" failureproperty="junit.failure">
> <sysproperty key="unittest_src" value="${unittest.src}"/>
> <classpath refid="fleetsystems.classpath"/>
> <formatter type="xml"/>
> <batchtest fork="yes"
> todir="${unittest.results}">
> <fileset dir="${unittest.src}">
> <include name="**/*Test.java"/>
> <include name="**/UT_*.java"/>
> <exclude name="**/testutils/**"/>
> </fileset>
> </batchtest>
> </junit>
> </target>
>
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org