You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ratis.apache.org by ru...@apache.org on 2020/12/28 11:36:23 UTC
[incubator-ratis] branch master updated: RATIS-1272. Remove unused
slf4j-log4j12 dependency. (#382)
This is an automated email from the ASF dual-hosted git repository.
runzhiwang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-ratis.git
The following commit(s) were added to refs/heads/master by this push:
new 2aeb237 RATIS-1272. Remove unused slf4j-log4j12 dependency. (#382)
2aeb237 is described below
commit 2aeb237fe77da9e49ba2976f4a64822634bcd38d
Author: Tsz-Wo Nicholas Sze <sz...@apache.org>
AuthorDate: Mon Dec 28 19:36:16 2020 +0800
RATIS-1272. Remove unused slf4j-log4j12 dependency. (#382)
---
ratis-common/pom.xml | 1 +
.../src/test/java/org/apache/ratis/BaseTest.java | 7 ------
ratis-examples/pom.xml | 10 ---------
ratis-grpc/pom.xml | 6 ++----
ratis-hadoop/pom.xml | 4 ----
ratis-logservice/pom.xml | 4 ----
ratis-metrics/pom.xml | 25 +++++++++++-----------
ratis-netty/pom.xml | 4 ----
ratis-replicated-map/pom.xml | 14 ------------
ratis-server-api/pom.xml | 4 ----
ratis-server/pom.xml | 4 ----
.../test/java/org/apache/ratis/RaftTestUtil.java | 2 +-
ratis-test/pom.xml | 10 +++++----
.../org.mockito.plugins.MockMaker | 1 -
14 files changed, 22 insertions(+), 74 deletions(-)
diff --git a/ratis-common/pom.xml b/ratis-common/pom.xml
index 0f75c49..ecfdf2f 100644
--- a/ratis-common/pom.xml
+++ b/ratis-common/pom.xml
@@ -40,6 +40,7 @@
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
+ <scope>test</scope>
</dependency>
<dependency>
diff --git a/ratis-common/src/test/java/org/apache/ratis/BaseTest.java b/ratis-common/src/test/java/org/apache/ratis/BaseTest.java
index 42d1e77..058d5ea 100644
--- a/ratis-common/src/test/java/org/apache/ratis/BaseTest.java
+++ b/ratis-common/src/test/java/org/apache/ratis/BaseTest.java
@@ -19,15 +19,12 @@ package org.apache.ratis;
import org.apache.log4j.Level;
import org.apache.ratis.conf.ConfUtils;
-import org.apache.ratis.proto.RaftProtos.RoutingTableProto;
import org.apache.ratis.protocol.RaftPeer;
-import org.apache.ratis.protocol.RaftPeerId;
import org.apache.ratis.protocol.RoutingTable;
import org.apache.ratis.util.ExitUtils;
import org.apache.ratis.util.FileUtils;
import org.apache.ratis.util.JavaUtils;
import org.apache.ratis.util.Log4jUtils;
-import org.apache.ratis.util.ProtoUtils;
import org.apache.ratis.util.TimeDuration;
import org.apache.ratis.util.function.CheckedRunnable;
import org.junit.After;
@@ -42,12 +39,8 @@ import java.io.File;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Collection;
-import java.util.HashMap;
-import java.util.HashSet;
import java.util.List;
-import java.util.Map;
import java.util.Objects;
-import java.util.Set;
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.Future;
import java.util.concurrent.ThreadLocalRandom;
diff --git a/ratis-examples/pom.xml b/ratis-examples/pom.xml
index da6b88d..7334f95 100644
--- a/ratis-examples/pom.xml
+++ b/ratis-examples/pom.xml
@@ -123,16 +123,6 @@
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
</dependency>
- <dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-log4j12</artifactId>
- <scope>compile</scope>
- </dependency>
- <dependency>
- <groupId>log4j</groupId>
- <artifactId>log4j</artifactId>
- </dependency>
-
<dependency>
<groupId>junit</groupId>
diff --git a/ratis-grpc/pom.xml b/ratis-grpc/pom.xml
index 312c79a..ba9006e 100644
--- a/ratis-grpc/pom.xml
+++ b/ratis-grpc/pom.xml
@@ -64,14 +64,12 @@
<scope>test</scope>
<type>test-jar</type>
</dependency>
+
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
</dependency>
- <dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-log4j12</artifactId>
- </dependency>
+
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
diff --git a/ratis-hadoop/pom.xml b/ratis-hadoop/pom.xml
index ba47fdf..e8ab6d2 100644
--- a/ratis-hadoop/pom.xml
+++ b/ratis-hadoop/pom.xml
@@ -68,10 +68,6 @@
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
</dependency>
- <dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-log4j12</artifactId>
- </dependency>
<dependency>
<groupId>junit</groupId>
diff --git a/ratis-logservice/pom.xml b/ratis-logservice/pom.xml
index 87bbadc..05760c9 100644
--- a/ratis-logservice/pom.xml
+++ b/ratis-logservice/pom.xml
@@ -209,10 +209,6 @@
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
</dependency>
- <dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-log4j12</artifactId>
- </dependency>
<!-- Test Ratis dependencies -->
<dependency>
<artifactId>ratis-netty</artifactId>
diff --git a/ratis-metrics/pom.xml b/ratis-metrics/pom.xml
index c9a29a6..634518c 100644
--- a/ratis-metrics/pom.xml
+++ b/ratis-metrics/pom.xml
@@ -30,13 +30,21 @@
<groupId>org.apache.ratis</groupId>
</dependency>
<dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-api</artifactId>
+ <artifactId>ratis-common</artifactId>
+ <groupId>org.apache.ratis</groupId>
+ </dependency>
+ <dependency>
+ <artifactId>ratis-common</artifactId>
+ <groupId>org.apache.ratis</groupId>
+ <scope>test</scope>
+ <type>test-jar</type>
</dependency>
+
<dependency>
<groupId>org.slf4j</groupId>
- <artifactId>slf4j-log4j12</artifactId>
+ <artifactId>slf4j-api</artifactId>
</dependency>
+
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
@@ -47,21 +55,12 @@
<artifactId>mockito-core</artifactId>
<scope>test</scope>
</dependency>
- <dependency>
- <artifactId>ratis-common</artifactId>
- <groupId>org.apache.ratis</groupId>
- </dependency>
+
<dependency>
<groupId>io.dropwizard.metrics</groupId>
<artifactId>metrics-core</artifactId>
</dependency>
<dependency>
- <artifactId>ratis-common</artifactId>
- <groupId>org.apache.ratis</groupId>
- <scope>test</scope>
- <type>test-jar</type>
- </dependency>
- <dependency>
<groupId>io.dropwizard.metrics</groupId>
<artifactId>metrics-jvm</artifactId>
<optional>true</optional>
diff --git a/ratis-netty/pom.xml b/ratis-netty/pom.xml
index e5e451a..e9ca6e3 100644
--- a/ratis-netty/pom.xml
+++ b/ratis-netty/pom.xml
@@ -72,9 +72,5 @@
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
</dependency>
- <dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-log4j12</artifactId>
- </dependency>
</dependencies>
</project>
diff --git a/ratis-replicated-map/pom.xml b/ratis-replicated-map/pom.xml
index 8c08e4b..c4d9221 100644
--- a/ratis-replicated-map/pom.xml
+++ b/ratis-replicated-map/pom.xml
@@ -63,16 +63,6 @@
<type>test-jar</type>
</dependency>
<dependency>
- <artifactId>ratis-hadoop</artifactId>
- <groupId>org.apache.ratis</groupId>
- </dependency>
- <dependency>
- <artifactId>ratis-hadoop</artifactId>
- <groupId>org.apache.ratis</groupId>
- <scope>test</scope>
- <type>test-jar</type>
- </dependency>
- <dependency>
<artifactId>ratis-grpc</artifactId>
<groupId>org.apache.ratis</groupId>
<scope>provided</scope>
@@ -99,10 +89,6 @@
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
</dependency>
- <dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-log4j12</artifactId>
- </dependency>
<dependency>
<groupId>junit</groupId>
diff --git a/ratis-server-api/pom.xml b/ratis-server-api/pom.xml
index fce56f2..d761947 100644
--- a/ratis-server-api/pom.xml
+++ b/ratis-server-api/pom.xml
@@ -47,9 +47,5 @@
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
</dependency>
- <dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-log4j12</artifactId>
- </dependency>
</dependencies>
</project>
diff --git a/ratis-server/pom.xml b/ratis-server/pom.xml
index 4f17a2d..a58ba53 100644
--- a/ratis-server/pom.xml
+++ b/ratis-server/pom.xml
@@ -67,10 +67,6 @@
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
- </dependency>
- <dependency>
- <groupId>log4j</groupId>
- <artifactId>log4j</artifactId>
<scope>test</scope>
</dependency>
diff --git a/ratis-server/src/test/java/org/apache/ratis/RaftTestUtil.java b/ratis-server/src/test/java/org/apache/ratis/RaftTestUtil.java
index 7279c1d..6314677 100644
--- a/ratis-server/src/test/java/org/apache/ratis/RaftTestUtil.java
+++ b/ratis-server/src/test/java/org/apache/ratis/RaftTestUtil.java
@@ -78,7 +78,7 @@ public interface RaftTestUtil {
f.setAccessible(true);
return f.get(obj);
} catch (Exception e) {
- throw new RuntimeException("Failed to get '" + fieldName + "' from " + clazz, e);
+ throw new IllegalStateException("Failed to get '" + fieldName + "' from " + clazz, e);
}
}
diff --git a/ratis-test/pom.xml b/ratis-test/pom.xml
index 29d197d..a5f3e86 100644
--- a/ratis-test/pom.xml
+++ b/ratis-test/pom.xml
@@ -27,6 +27,7 @@
<dependency>
<artifactId>ratis-common</artifactId>
<groupId>org.apache.ratis</groupId>
+ <scope>test</scope>
</dependency>
<dependency>
<artifactId>ratis-common</artifactId>
@@ -38,11 +39,13 @@
<dependency>
<artifactId>ratis-client</artifactId>
<groupId>org.apache.ratis</groupId>
+ <scope>test</scope>
</dependency>
<dependency>
<artifactId>ratis-server</artifactId>
<groupId>org.apache.ratis</groupId>
+ <scope>test</scope>
</dependency>
<dependency>
<artifactId>ratis-server</artifactId>
@@ -54,6 +57,7 @@
<dependency>
<artifactId>ratis-netty</artifactId>
<groupId>org.apache.ratis</groupId>
+ <scope>test</scope>
</dependency>
<dependency>
<artifactId>ratis-netty</artifactId>
@@ -65,6 +69,7 @@
<dependency>
<artifactId>ratis-grpc</artifactId>
<groupId>org.apache.ratis</groupId>
+ <scope>test</scope>
</dependency>
<dependency>
<artifactId>ratis-grpc</artifactId>
@@ -76,14 +81,11 @@
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
+ <scope>test</scope>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
- </dependency>
- <dependency>
- <groupId>log4j</groupId>
- <artifactId>log4j</artifactId>
<scope>test</scope>
</dependency>
diff --git a/ratis-test/src/test/resources/mockito-extensions/org.mockito.plugins.MockMaker b/ratis-test/src/test/resources/mockito-extensions/org.mockito.plugins.MockMaker
index 7196fbd..a258d79 100644
--- a/ratis-test/src/test/resources/mockito-extensions/org.mockito.plugins.MockMaker
+++ b/ratis-test/src/test/resources/mockito-extensions/org.mockito.plugins.MockMaker
@@ -9,6 +9,5 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
-# log4j configuration used during build and unit tests
mock-maker-inline