Skip to content

Commit

Permalink
[ZEPPELIN-5050] Remove commons-logging and switch to slf4j and jcl-ov…
Browse files Browse the repository at this point in the history
…er-slf4j

### What is this PR for?
This PR removes logging implementations with scope compile in all Zeppelin libraries (interpreter).
jcl-over-slf4j is used as a bridge for commons-logging.
commons-logging is removed as a dependency.

### What type of PR is it?
 - Improvement

### Todos
* [ ] - Task

### What is the Jira issue?
* https://issues.apache.org/jira/browse/ZEPPELIN-5050

### How should this be tested?
* Travis-CI: https://travis-ci.org/github/Reamer/zeppelin/builds/727960669

### Questions:
* Does the licenses files need update? No
* Is there breaking changes for older versions? No
* Does this needs documentation? No

Author: Philipp Dallig <philipp.dallig@gmail.com>

Closes apache#3914 from Reamer/cleanup_loggging and squashes the following commits:

85f1681 [Philipp Dallig] Remove commons-logging and switch to slf4j and jcl-over-slf4j
  • Loading branch information
Reamer committed Sep 21, 2020
1 parent c9f3616 commit 8b43c44
Show file tree
Hide file tree
Showing 20 changed files with 118 additions and 122 deletions.
15 changes: 0 additions & 15 deletions cassandra/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -125,21 +125,6 @@
<artifactId>slf4j-api</artifactId>
</dependency>

<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
</dependency>

<dependency>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</dependency>

<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
</dependency>

<!-- test libraries -->
<dependency>
<groupId>org.scalatest</groupId>
Expand Down
10 changes: 0 additions & 10 deletions flink/interpreter/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -57,16 +57,6 @@
<artifactId>slf4j-api</artifactId>
</dependency>

<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
</dependency>

<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
</dependency>

<dependency>
<groupId>org.apache.zeppelin</groupId>
<artifactId>flink-shims</artifactId>
Expand Down
10 changes: 0 additions & 10 deletions flink/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -53,16 +53,6 @@
<artifactId>slf4j-api</artifactId>
</dependency>

<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
</dependency>

<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
</dependency>

<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
Expand Down
7 changes: 7 additions & 0 deletions markdown/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,13 @@
<groupId>com.vladsch.flexmark</groupId>
<artifactId>flexmark-all</artifactId>
<version>${flexmark.all.version}</version>
<exclusions>
<!-- jcl-over-slf4j is provided by zeppelin-interprerter -->
<exclusion>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</exclusion>
</exclusions>
</dependency>

<dependency>
Expand Down
53 changes: 46 additions & 7 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,6 @@
<commons.codec.version>1.14</commons.codec.version>
<commons.io.version>2.6</commons.io.version>
<commons.collections.version>3.2.2</commons.collections.version>
<commons.logging.version>1.1.1</commons.logging.version>
<commons.cli.version>1.4</commons.cli.version>
<shiro.version>1.4.2</shiro.version>
<joda.version>2.9.9</joda.version>
Expand Down Expand Up @@ -221,6 +220,13 @@
<version>${slf4j.version}</version>
</dependency>

<!-- Use jcl-over-slf4j instead of commons-logging -->
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>jcl-over-slf4j</artifactId>
<version>${slf4j.version}</version>
</dependency>

<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
Expand Down Expand Up @@ -249,12 +255,26 @@
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
<version>${httpcomponents.client.version}</version>
<exclusions>
<!-- using jcl-over-slf4j instead -->
<exclusion>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</exclusion>
</exclusions>
</dependency>

<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpasyncclient</artifactId>
<version>${httpcomponents.asyncclient.version}</version>
<exclusions>
<!-- using jcl-over-slf4j instead -->
<exclusion>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</exclusion>
</exclusions>
</dependency>

<dependency>
Expand Down Expand Up @@ -305,12 +325,6 @@
<version>${commons.collections.version}</version>
</dependency>

<dependency>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
<version>${commons.logging.version}</version>
</dependency>

<dependency>
<groupId>commons-cli</groupId>
<artifactId>commons-cli</artifactId>
Expand Down Expand Up @@ -480,6 +494,11 @@
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
</exclusion>
<!-- using jcl-over-slf4j instead -->
<exclusion>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</exclusion>
</exclusions>
</dependency>

Expand Down Expand Up @@ -549,6 +568,11 @@
<groupId>org.apache.commons</groupId>
<artifactId>commons-math3</artifactId>
</exclusion>
<!-- using jcl-over-slf4j instead -->
<exclusion>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</exclusion>
</exclusions>
</dependency>

Expand Down Expand Up @@ -623,6 +647,11 @@
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-annotations</artifactId>
</exclusion>
<!-- using jcl-over-slf4j instead -->
<exclusion>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</exclusion>
</exclusions>
</dependency>

Expand Down Expand Up @@ -745,6 +774,11 @@
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
</exclusion>
<!-- using jcl-over-slf4j instead -->
<exclusion>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</exclusion>
</exclusions>
</dependency>

Expand Down Expand Up @@ -855,6 +889,11 @@
<groupId>com.fasterxml.jackson.module</groupId>
<artifactId>jackson-module-jaxb-annotations</artifactId>
</exclusion>
<!-- using jcl-over-slf4j instead -->
<exclusion>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</exclusion>
<!-- <exclusion>-->
<!-- <groupId>com.google.inject.extensions</groupId>-->
<!-- <artifactId>guice-servlet</artifactId>-->
Expand Down
5 changes: 0 additions & 5 deletions spark/interpreter/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -228,11 +228,6 @@
<version>${commons.exec.version}</version>
</dependency>

<dependency>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</dependency>

<dependency>
<groupId>org.scala-lang</groupId>
<artifactId>scala-library</artifactId>
Expand Down
10 changes: 0 additions & 10 deletions spark/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -76,16 +76,6 @@
<artifactId>slf4j-api</artifactId>
</dependency>

<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
</dependency>

<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
</dependency>

<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
Expand Down
9 changes: 0 additions & 9 deletions spark/spark-scala-parent/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -114,15 +114,6 @@
<artifactId>slf4j-api</artifactId>
</dependency>

<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
</dependency>

<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
</dependency>
</dependencies>


Expand Down
5 changes: 0 additions & 5 deletions zeppelin-client-examples/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,6 @@
<artifactId>slf4j-api</artifactId>
</dependency>

<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
</dependency>

<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
Expand Down
5 changes: 0 additions & 5 deletions zeppelin-client/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -77,11 +77,6 @@
<artifactId>slf4j-api</artifactId>
</dependency>

<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
</dependency>

<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
Expand Down
5 changes: 0 additions & 5 deletions zeppelin-common/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,6 @@
<artifactId>slf4j-api</artifactId>
</dependency>

<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
</dependency>

<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
Expand Down
5 changes: 0 additions & 5 deletions zeppelin-display/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -78,11 +78,6 @@
<artifactId>slf4j-api</artifactId>
</dependency>

<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
</dependency>

<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
Expand Down
4 changes: 0 additions & 4 deletions zeppelin-integration/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -108,10 +108,6 @@
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
</dependency>

<!--test libraries-->
<dependency>
Expand Down
15 changes: 0 additions & 15 deletions zeppelin-interpreter-parent/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -52,25 +52,10 @@
<artifactId>slf4j-api</artifactId>
</dependency>

<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
</dependency>

<dependency>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</dependency>

<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-exec</artifactId>
</dependency>

<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
</dependency>

<dependency>
<groupId>junit</groupId>
Expand Down
3 changes: 1 addition & 2 deletions zeppelin-interpreter-shaded/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,7 @@
<!-- Leave slf4j unshaded so downstream users can configure logging. -->
<exclude>org.slf4j:slf4j-api</exclude>
<exclude>org.slf4j:slf4j-log4j12</exclude>
<!-- Leave commons-logging unshaded so downstream users can configure logging. -->
<exclude>commons-logging:commons-logging</exclude>
<exclude>org.slf4j:jcl-over-slf4j</exclude>
<!-- Leave log4j unshaded so downstream users can configure logging. -->
<exclude>log4j:log4j</exclude>
</excludes>
Expand Down
Loading

0 comments on commit 8b43c44

Please sign in to comment.