ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dani Zweig" <>
Subject Forked junit task not finding TestRunner in optional jar
Date Wed, 13 Jun 2001 16:28:42 GMT
I have been trying to get the junit task to work.  Below is a try at running
one of the junit sample test suites.

	 <target name="tryjunit" depends="init">
		<junit printsummary="yes" fork="yes">
		          <pathelement location="${ROOT}/junit/3.5/junit3.5"/>
			    <pathelement location="${ROOT}/junit/3.5/junit.jar"/>
		    <formatter type="plain"/>
  		    <test name="" outfile="test.results"/>

It works correctly if fork="no".  However, if fork="yes", as in the above
snippet, I get the following error:

    [junit] Running
    [junit] java.lang.NoClassDefFoundError:
    [junit] TEST FAILED

Note that JunitTestRunner *is* in jakarta-ant-1.3-optional.jar, and that jar
*is* in the ant lib directory (or the fork="no" case wouldn't work either).

Is the classpath not being passed to the forked jvm?  (I tried passing it
via 'jvmarg', but that generated an "unrecognized option" error.)


- Dani Zweig

View raw message