Tuesday, August 17, 2010

Hamcrest 1.1 Security Error on Eclipse Gallileo With JMock

Finally i started working on unit tests and already got a gotcha on eclipse galileo with jMock 2.5.1.
Galileo Ships with jUnit 4 but unfortunately without org.hamcrest.TypeSafeMatcher which is needed by jMock.

Adding jMock through Maven still leaves the Problem with Classpath and who comes first.

I tried the following links with no luck:
http://www.southsearepublic.org
http://cedar715.wordpress.com/2009/10/20/86/

Then i removed jUnit Libraries in Project Properties under Java Build Path => Libraries and added jUnit through Maven Dependencies.

Works like a charm now.