From d695fd756e05c1e25e5c9d48e69ef8c5b1ce8db4 Mon Sep 17 00:00:00 2001
From: yukon <yukon@apache.org>
Date: Mon, 16 Jan 2017 21:08:29 +0800
Subject: [PATCH] [ROCKETMQ-62] Polish unit test related dependency

---
 broker/pom.xml    | 10 ----------
 client/pom.xml    |  5 -----
 common/pom.xml    |  5 -----
 example/pom.xml   |  5 -----
 filtersrv/pom.xml |  5 -----
 namesrv/pom.xml   |  5 -----
 pom.xml           | 43 ++++++++++++++++++++++++++-----------------
 remoting/pom.xml  | 10 ----------
 srvutil/pom.xml   |  5 -----
 store/pom.xml     |  5 -----
 tools/pom.xml     |  5 -----
 11 files changed, 26 insertions(+), 77 deletions(-)

diff --git a/broker/pom.xml b/broker/pom.xml
index fae61c20..91cfe0c4 100644
--- a/broker/pom.xml
+++ b/broker/pom.xml
@@ -29,16 +29,6 @@
     <name>rocketmq-broker ${project.version}</name>
 
     <dependencies>
-        <dependency>
-            <groupId>junit</groupId>
-            <artifactId>junit</artifactId>
-            <scope>test</scope>
-        </dependency>
-        <!--<dependency>-->
-        <!--<groupId>commons-beanutils</groupId>-->
-        <!--<artifactId>commons-beanutils</artifactId>-->
-        <!--<version>1.9.2</version>-->
-        <!--</dependency>-->
         <dependency>
             <groupId>${project.groupId}</groupId>
             <artifactId>rocketmq-common</artifactId>
diff --git a/client/pom.xml b/client/pom.xml
index 1adfb6ea..713523d6 100644
--- a/client/pom.xml
+++ b/client/pom.xml
@@ -30,11 +30,6 @@
     <name>rocketmq-client ${project.version}</name>
 
     <dependencies>
-        <dependency>
-            <groupId>junit</groupId>
-            <artifactId>junit</artifactId>
-            <scope>test</scope>
-        </dependency>
         <dependency>
             <groupId>${project.groupId}</groupId>
             <artifactId>rocketmq-common</artifactId>
diff --git a/common/pom.xml b/common/pom.xml
index 2e41f2f5..549dad97 100644
--- a/common/pom.xml
+++ b/common/pom.xml
@@ -30,11 +30,6 @@
 
 
     <dependencies>
-        <dependency>
-            <groupId>junit</groupId>
-            <artifactId>junit</artifactId>
-            <scope>test</scope>
-        </dependency>
         <dependency>
             <groupId>${project.groupId}</groupId>
             <artifactId>rocketmq-remoting</artifactId>
diff --git a/example/pom.xml b/example/pom.xml
index 3e822971..c6dbf676 100644
--- a/example/pom.xml
+++ b/example/pom.xml
@@ -29,11 +29,6 @@
     <name>rocketmq-example ${project.version}</name>
 
     <dependencies>
-        <dependency>
-            <groupId>junit</groupId>
-            <artifactId>junit</artifactId>
-            <scope>test</scope>
-        </dependency>
         <dependency>
             <groupId>${project.groupId}</groupId>
             <artifactId>rocketmq-client</artifactId>
diff --git a/filtersrv/pom.xml b/filtersrv/pom.xml
index 1a8bf8bd..b0313573 100644
--- a/filtersrv/pom.xml
+++ b/filtersrv/pom.xml
@@ -29,11 +29,6 @@
     <name>rocketmq-filtersrv ${project.version}</name>
 
     <dependencies>
-        <dependency>
-            <groupId>junit</groupId>
-            <artifactId>junit</artifactId>
-            <scope>test</scope>
-        </dependency>
         <dependency>
             <groupId>${project.groupId}</groupId>
             <artifactId>rocketmq-client</artifactId>
diff --git a/namesrv/pom.xml b/namesrv/pom.xml
index 87d33def..c505bfcc 100644
--- a/namesrv/pom.xml
+++ b/namesrv/pom.xml
@@ -29,11 +29,6 @@
     <name>rocketmq-namesrv ${project.version}</name>
 
     <dependencies>
-        <dependency>
-            <groupId>junit</groupId>
-            <artifactId>junit</artifactId>
-            <scope>test</scope>
-        </dependency>
         <dependency>
             <groupId>org.apache.rocketmq</groupId>
             <artifactId>rocketmq-client</artifactId>
diff --git a/pom.xml b/pom.xml
index 91ad94cf..ca7ea1da 100644
--- a/pom.xml
+++ b/pom.xml
@@ -411,6 +411,27 @@
         </profile>
     </profiles>
 
+    <dependencies>
+        <dependency>
+            <groupId>junit</groupId>
+            <artifactId>junit</artifactId>
+            <version>4.11</version>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.assertj</groupId>
+            <artifactId>assertj-core</artifactId>
+            <version>2.6.0</version>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.mockito</groupId>
+            <artifactId>mockito-core</artifactId>
+            <version>2.6.3</version>
+            <scope>test</scope>
+        </dependency>
+    </dependencies>
+
     <dependencyManagement>
         <dependencies>
             <dependency>
@@ -463,18 +484,6 @@
                 <artifactId>rocketmq-srvutil</artifactId>
                 <version>${project.version}</version>
             </dependency>
-            <dependency>
-                <groupId>junit</groupId>
-                <artifactId>junit</artifactId>
-                <version>4.11</version>
-                <scope>test</scope>
-            </dependency>
-            <dependency>
-                <groupId>org.assertj</groupId>
-                <artifactId>assertj-core</artifactId>
-                <version>2.6.0</version>
-                <scope>test</scope>
-            </dependency>
             <dependency>
                 <groupId>org.slf4j</groupId>
                 <artifactId>slf4j-api</artifactId>
@@ -510,16 +519,16 @@
                 <artifactId>javassist</artifactId>
                 <version>3.20.0-GA</version>
             </dependency>
-            <dependency>
-                <groupId>org.apache.commons</groupId>
-                <artifactId>commons-lang3</artifactId>
-                <version>3.4</version>
-            </dependency>
             <dependency>
                 <groupId>net.java.dev.jna</groupId>
                 <artifactId>jna</artifactId>
                 <version>4.2.2</version>
             </dependency>
+            <dependency>
+                <groupId>org.apache.commons</groupId>
+                <artifactId>commons-lang3</artifactId>
+                <version>3.4</version>
+            </dependency>
         </dependencies>
     </dependencyManagement>
 </project>
diff --git a/remoting/pom.xml b/remoting/pom.xml
index 050be172..df46c353 100644
--- a/remoting/pom.xml
+++ b/remoting/pom.xml
@@ -30,16 +30,6 @@
 
 
     <dependencies>
-        <dependency>
-            <groupId>junit</groupId>
-            <artifactId>junit</artifactId>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.assertj</groupId>
-            <artifactId>assertj-core</artifactId>
-            <scope>test</scope>
-        </dependency>
         <dependency>
             <groupId>com.alibaba</groupId>
             <artifactId>fastjson</artifactId>
diff --git a/srvutil/pom.xml b/srvutil/pom.xml
index ef01639e..4850b1e9 100644
--- a/srvutil/pom.xml
+++ b/srvutil/pom.xml
@@ -30,11 +30,6 @@
 
 
     <dependencies>
-        <dependency>
-            <groupId>junit</groupId>
-            <artifactId>junit</artifactId>
-            <scope>test</scope>
-        </dependency>
         <dependency>
             <groupId>${project.groupId}</groupId>
             <artifactId>rocketmq-remoting</artifactId>
diff --git a/store/pom.xml b/store/pom.xml
index 8438f8cc..083d4148 100644
--- a/store/pom.xml
+++ b/store/pom.xml
@@ -37,11 +37,6 @@
             <groupId>net.java.dev.jna</groupId>
             <artifactId>jna</artifactId>
         </dependency>
-        <dependency>
-            <groupId>junit</groupId>
-            <artifactId>junit</artifactId>
-            <scope>test</scope>
-        </dependency>
         <dependency>
             <groupId>ch.qos.logback</groupId>
             <artifactId>logback-classic</artifactId>
diff --git a/tools/pom.xml b/tools/pom.xml
index 506c473e..0e99f9c8 100644
--- a/tools/pom.xml
+++ b/tools/pom.xml
@@ -29,11 +29,6 @@
     <name>rocketmq-tools ${project.version}</name>
 
     <dependencies>
-        <dependency>
-            <groupId>junit</groupId>
-            <artifactId>junit</artifactId>
-            <scope>test</scope>
-        </dependency>
         <dependency>
             <groupId>${project.groupId}</groupId>
             <artifactId>rocketmq-client</artifactId>
-- 
GitLab