]> source.dussan.org Git - vaadin-framework.git/commitdiff
Fix Mockito/Hamcrest build classpath conflict
authorJohn Ahlroos <john@vaadin.com>
Wed, 28 Sep 2016 10:52:11 +0000 (13:52 +0300)
committerPekka Hyvönen <pekka@vaadin.com>
Tue, 18 Oct 2016 09:51:58 +0000 (12:51 +0300)
* Fixes issue with Mockito classes not found on the vaadin-client test classpath
* Fixes Mockito/Hamcrest dependency conflict described in
       https://tedvinke.wordpress.com/2013/12/17/mixing-junit-hamcrest-and-mockito-explaining-nosuchmethoderror/

Reapplying after dependency leaking from root project to bom module has been fixed.

Change-Id: I0f2f368ccc6acb303f693aa34ace9e893ab7b573

client/pom.xml
pom.xml

index ca6009a00736f69b5dd95d22d5f7aca40120c9cb..53a497b1836210f7c858f44794b8c2183207cd3e 100644 (file)
             <groupId>com.google.gwt</groupId>
             <artifactId>gwt-elemental</artifactId>
         </dependency>
+
+        <dependency>
+            <groupId>org.mockito</groupId>
+            <artifactId>mockito-core</artifactId>
+        </dependency>
     </dependencies>
 
     <build>
diff --git a/pom.xml b/pom.xml
index e82cbac4a45db45f19679be2abc49364ef5ec524..6848b88c8bba75cc0e6a976c8c674c83c4d3f804 100644 (file)
--- a/pom.xml
+++ b/pom.xml
                 <groupId>junit</groupId>
                 <artifactId>junit</artifactId>
                 <version>4.12</version>
+                <exclusions>
+                   <exclusion>
+                       <artifactId>hamcrest-core</artifactId>
+                       <groupId>org.hamcrest</groupId>
+                   </exclusion>
+                </exclusions>
             </dependency>
             <dependency>
                 <groupId>org.easymock</groupId>
             </dependency>
             <dependency>
                 <groupId>org.mockito</groupId>
-                <artifactId>mockito-all</artifactId>
+                <artifactId>mockito-core</artifactId>
                 <version>1.9.5</version>
+                <exclusions>
+                   <exclusion>
+                      <artifactId>hamcrest-core</artifactId>
+                      <groupId>org.hamcrest</groupId>
+                  </exclusion>
+                </exclusions>
             </dependency>
             <dependency>
                 <groupId>org.hamcrest</groupId>
         </dependency>
         <dependency>
             <groupId>org.mockito</groupId>
-            <artifactId>mockito-all</artifactId>
+            <artifactId>mockito-core</artifactId>
             <scope>test</scope>
         </dependency>
         <dependency>