| Author |
ant and junit, kicking my butt
|
Tony Smith
Ranch Hand
Joined: Mar 15, 2005
Posts: 77
|
|
I'd read the documentation, but I don't know what part of the documentation to read! Gives the ubiquitous Does this mean that somehow junit isn't bound to the appropriate class in the classpath? I am using websphere, it understands the syntax of the junit task. I am probably making this a lot harder than it is but I keep going around in circles. questions: 1) how can I tell which class (and jar) the junit task is supposed to be associated with 2) when do I specify that jar? it seems to me that putting it in the classpath within the junit task is too late! I added the ant-junit.jar to my system path but that didn't seem to help. help please!
|
 |
Ernest Friedman-Hill
author and iconoclast
Marshal
Joined: Jul 08, 2003
Posts: 24054
|
|
|
This is stupid, painful, and obnoxious, and frankly, I don't understand why they don't simply ship things this way already, but... the simple, direct, easy fix is to drop a copy of junit.jar into your ANT_HOME/lib directory.
|
[Jess in Action][AskingGoodQuestions]
|
 |
Tony Smith
Ranch Hand
Joined: Mar 15, 2005
Posts: 77
|
|
I copied the file and got no change in behavior. When ant sees 'junit' how does it know which junit class to execute? I have tried 100 things and nothing has affected the output at all - same error. It is if my error is far more basic.
|
 |
Tony Smith
Ranch Hand
Joined: Mar 15, 2005
Posts: 77
|
|
|
This problem relates to websphere. Specifically, it includes a way to configure the environment for ant internally. It seems to ignore the system classpath and path. I pointed it to the junit.jar as inspired by your suggestion and got a little farther.
|
 |
Tony Smith
Ranch Hand
Joined: Mar 15, 2005
Posts: 77
|
|
It seems like I can't solve anything until I get frustrated and post here. Anyway, here's a solution that is pure ant (no websphere) except for putting junit.jar into the classpath before the 'junit' target gets invoked.
|
 |
 |
|
|
subject: ant and junit, kicking my butt
|
|
|