]> 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)
committerVaadin Code Review <review@vaadin.com>
Wed, 5 Oct 2016 08:49:04 +0000 (08:49 +0000)
* 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/

Change-Id: I946c464118e3b9365bb8da4fb337fd45e6073f5e

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 0092f32b63b8ed2e3aab937f3ea0289f0ada5cff..f25f81fbaf6e3ba59a7be13867237df88ac4936a 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>