Jeremy Huiskamp wrote:
Hi,
junit.jar is in the classpath but removing it (once the test classes
are built) doesn't help, I get the exact same error.
Why are you removing it? It needs to be on the classpath during
compile and while you run the tests. How is junit supposed to run if
it's not even loaded? Also, I believe ant-junit.jar must be on the
classpath *before* you write in the <junit> task (not within the task
itself). Ant can't load the task up if it doesn't have an
implementation for it. I'd recommend sticking both junit.jar and ant-
junit.jar in ANT_HOME/lib because junit will obviously have to load
before ant-junit.
Thanks Jeremy, a combination of those ideas worked.
I was indicating that I'd tried it both ways. I'd thought that removing
junit.jar from the classpath may help in the case where the first class
was being found by a classloader that then couldn't find the second when
the request should have been passed on to a classloader that can find
both. Thought it was worth a try anyway.
Reply to everyone>
Sorry for including commented out sections in the example. Belive me it
wasn't my intention to confuse anyone, quite the opposite. I was trying
to show you all the options I had tried.
My original post was asking what $ANT_HOME should be on OpenBSD as the
optional ant jars are not in a directory called lib and I couldn't find
anything that looks like the normal ant install tree. So I still think
the question was relevent to this list.
Adding a symlink called lib and pointing $ANT_HOME to that does work at
least in this case. Maybe that should be part of the package.
MikeG