ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Antoine Lévy-Lambert <anto...@antbuild.com>
Subject Re: Can't Run JUnits With ANT 1.6
Date Tue, 06 Jan 2004 22:07:17 GMT
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


Mime
View raw message