Hamcrest class conflicts
Closed this issue · 7 comments
GoogleCodeExporter commented
What steps will reproduce the problem?
1. include mockito-all:1.9.5, junit:4.11, hamcrest-library:1.3.0
2. Intermittently causes "java.lang.NoSuchMethodError:
org.hamcrest.Matcher.describeMismatch(java/lang/Object;Lorg/hamcrest/Description
)"
3.
What is the expected output? What do you see instead?
No Exception should be thrown, Mockito should NOT package Hamcrest classes in
its own jar, this obsolete version can not be managed through a build tool
(Maven, Gradle, etc). It is simply a bad practice!
What version of the product are you using? On what operating system?
mockito-all:1.9.5, junit:4.11, hamcrest-library:1.3.0
Windows & Mac
Please provide any additional information below.
As a workaround, which is an unreliable hack is to put the hamcrest-library jar
at the top of the maven dependencies. Clearly, this is not the optimal
solution. Mockito MUST not include other project's packages, it is
unmanageable!
Original issue reported on code.google.com by gordondi...@gmail.com
on 30 Oct 2013 at 4:41
- Merged into: #423
GoogleCodeExporter commented
Any updates?
Original comment by imamon...@griddynamics.com
on 21 Nov 2013 at 8:37
GoogleCodeExporter commented
Original comment by brice.du...@gmail.com
on 4 Dec 2013 at 1:51
- Added labels: Hamcrest
GoogleCodeExporter commented
Indeed hamcrest update is becoming more urgent as many project now use an
updated version.
By the way if you have a pull request on github it would be awesome.
Original comment by brice.du...@gmail.com
on 4 Dec 2013 at 1:53
- Changed state: Accepted
- Added labels: Priority-High
- Removed labels: Priority-Medium
GoogleCodeExporter commented
[deleted comment]
GoogleCodeExporter commented
Pull request - https://github.com/mockito/mockito/pull/27
Original comment by marcin.g...@gmail.com
on 17 Dec 2013 at 11:58
GoogleCodeExporter commented
Travis build passes for the pull request
Original comment by marcin.g...@gmail.com
on 19 Dec 2013 at 4:11
GoogleCodeExporter commented
Original comment by brice.du...@gmail.com
on 24 Dec 2013 at 11:54
- Changed state: Duplicate