First, I am not sure where I would specify those properties (as I am not
sure how ant is providing a classpath to Junit) so I have not been able to
try your suggestion.
More importantly, though, your comment does not address my main conundrum,
which is: why does the junit call work fine if I simply separate the two ant
targets into separate invocations of ant, one to do the build and one to run
the test?
Martin Gainty writes:
With Junit 3.7
I know system classloader is supposed to handle the DOM and SAX packages
excluded.0=org.w3c.dom.*
excluded.1=org.xml.sax.*
be sure to add these 2 entries in your excluded.properties.on your Junit
classpath
----- Original Message -----
From: <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Saturday, January 26, 2008 3:10 PM
Subject: a dependency mystery with junit
I have a 2000+ line Ant file that has been working fine for a long time.
I also have a moving target in that I frequently make minor tweaks as I
find
something I missed.
The problem that I have just started seeing is that junit is failing every
test saying it cannot find my classes when I build everything, i.e. "ant
clean all" where 'all' is defined as:
<target name="all" depends="init, dist, test, website" ...
junit is invoked in the 'test' target above so I, of course, thought that
a change in my 'website' target must have affected this. I moved 'test' to
last place in the 'depends' line above, but it still yielded the same
result: failing every test. Why this is curious is that if I immediately
run
"ant test" then all the tests run fine.
Any thoughts on why this is happening? Or why it just started happening?
Ant: v1.7.0
JUnit: v4.1
OS: Windows XP SP2
My Junit invocation:
<junit printsummary="yes" haltonfailure="no">
<formatter type="plain"/>
<batchtest todir="${reports.tests}">
<fileset dir="${src.tests}">
<include name="**/*Test*.java"/>
</fileset>
</batchtest>
</junit>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]