• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

ant and junit, kicking my butt

 
Ranch Hand
Posts: 77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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!
 
author and iconoclast
Posts: 24207
46
Mac OS X Eclipse IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Tony Smith
Ranch Hand
Posts: 77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.

 
Put the moon back where you found it! We need it for tides and poetry and stuff. Like this tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic