Permalink
Browse files

Depend on junit-dep instead of junit

The junit jar (vs the junit-dep jar) contains several hamcrest classes.
Since we include hamcrest-core anyway, we should be using junit-dep
(which does not contain any hamcrest classes).  junit-4.8.2 contains an
old (<1.2) version of hamcrest.  This can cause problems (specifically,
"java.lang.NoSuchMethodError:
org.hamcrest.Matcher.describeMismatch(Ljava/lang/Object;Lorg/hamcrest/Description;)V")
if someone uses a library that contains custom matchers extending >1.2
org.hamcrest.Matcher but has Robolectric on their classpath before
hamcrest-core, as the org.hamcrest.MatcherAssert contained in
junit-4.8.2 is not compatible with org.hamcrest.Matcher contained in
hamcrest-core-1.2
  • Loading branch information...
1 parent bf17357 commit 1f55fee3f9f89fe311537193f4aafb3ec658b183 @avh4 avh4 committed Mar 19, 2012
Showing with 1 addition and 1 deletion.
  1. BIN lib/main/{junit-4.8.2.jar → junit-dep-4.8.2.jar}
  2. +1 −1 pom.xml
Binary file not shown.
View
@@ -26,7 +26,7 @@
<dependency>
<groupId>junit</groupId>
- <artifactId>junit</artifactId>
+ <artifactId>junit-dep</artifactId>
<version>4.8.2</version>
<scope>provided</scope>
</dependency>

0 comments on commit 1f55fee

Please sign in to comment.