ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From KC Baltz <>
Subject Question about Ant task and fork="yes"
Date Fri, 23 Mar 2001 14:01:47 GMT
I ran into a problem with some of my jUnit tests yesterday because we have
upgraded to crimson.jar.  I was getting conflicts with the version of
jaxp.jar included with Ant.  The solution that worked for me was to add
fork="yes" to the <batchtest> element.  However, I was dismayed to find that
I had to include ant.jar and optional.jar in the <classpath> in order for
batchtest to work.  If I don't include ant.jar, I get the following

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

Below is the relevant <junit> task.

		<junit printsummary="yes" haltonfailure="no">
				<path refid="jUnitClasspath" />
location="${AntHome}/lib/ant.jar" />
location="${AntHome}/lib/optional.jar" />

			<formatter type="plain" />

			<batchtest fork="yes">
				<fileset dir="${jUnitTestPath}">
					<include name="**/*" />

BTW, it was not sufficient to fork <junit>.  I actually had to fork
<batchtest> in order to get rid of ant/lib/jaxp.jar.

K.C. Baltz
Senior Engineer
Response Networks, Inc.
North Andover, MA

View raw message