ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <bode...@apache.org>
Subject Re: Ant 1.6 and JUnit - NoClassDefFoundError
Date Wed, 07 Jan 2004 14:08:43 GMT
On Wed, 7 Jan 2004, Keith Hatton <khatton@axiomsystems.com> wrote:

> The only changes to the standard installation is that I've copied
> junit.jar and xalan.jar into ANT_HOME/lib (which I did for Ant 1.5)
> - prior to this the build complained that it couldn't find JUnit
> classes.

You are forking junit and have includeantruntime set to false,
correct?

Ant 1.5 had an unfortunate xercesImpl.jar entry in ant.jar's and
optional.jar's manifest that caused lot of problems for people who
wanted to use a different XML parser in their test.  This has been
fixed in 1.6.

A side effect of that bug was that you head a full fledged XML parser
and supporting classes available in the VM running the tests in 1.5
which you don't have anymore in 1.6 - unless you add xml-apis.jar
(should be all you need) to your <classpath>.

So yes, there is a backwards incompatibility but it is easy to fix.
Either add xml-apis.jar explicitly to your <classpath> or don't use
the XML formatter.

Stefan

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message