[ 
https://issues.apache.org/jira/browse/GOBBLIN-1256?focusedWorklogId=483346&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-483346
 ]

ASF GitHub Bot logged work on GOBBLIN-1256:
-------------------------------------------

                Author: ASF GitHub Bot
            Created on: 12/Sep/20 21:48
            Start Date: 12/Sep/20 21:48
    Worklog Time Spent: 10m 
      Work Description: ZihanLi58 commented on a change in pull request #3099:
URL: https://github.com/apache/incubator-gobblin/pull/3099#discussion_r487312036



##########
File path: gradle/scripts/globalDependencies.gradle
##########
@@ -35,20 +36,36 @@ subprojects {
           compile(externalDependency.guava) {
               force = true
           }
-      }
-          compile(externalDependency.commonsCodec) {
-            force = true
-          }
+        }
+        compile(externalDependency.commonsCodec) {
+          force = true
+        }
+        //Since testCompile inherit from compile, so we cannot use testCompile 
to import dependency for log4j
+        customTestCompile externalDependency.log4j
+        customTestCompile externalDependency.slf4jToLog4j
 
         // Required to add JDK's tool jar, which is required to run byteman 
tests.
         testCompile (files(((URLClassLoader) 
ToolProvider.getSystemToolClassLoader()).getURLs()))
       }
+      if (!project.name.contains('gobblin-aws')) {
+        configurations.compile.dependencies*.each {
+          //exclude this jar because we introduce log4j-over-slf4j, these two 
jars cannot present at the same time
+          it.exclude group: 'org.slf4j', module: 'slf4j-log4j12'
+          //exclude log4j related jars to provide a clean log environment
+          it.exclude group: 'log4j', module: 'log4j'
+          it.exclude group: 'log4j', module: 'apache-log4j-extras'
+        }
+      }
       all*.exclude group: 'org.apache.calcite', module: 'calcite-avatica' // 
replaced by org.apache.calcite.avatica:avatica-core
-      //exclude this jar because we introduce log4j-over-slf4j, these two jars 
cannot present at the same time
-      compileClasspath.exclude group: 'org.slf4j', module: 'slf4j-log4j12'

Review comment:
       On Line51 (configurations.compile.dependencies*.each ) I add the config 
to exclude slf4j-log4j12 and log4j related jar.  The reason for using this 
statement is that I find when we call compile.exclude to exclude some jar, the 
published artifacts will still contains that transient dependency. So I use 
this statement to make sure our published artifacts do not contains log4j 
related dependency

##########
File path: gradle/scripts/globalDependencies.gradle
##########
@@ -35,20 +36,36 @@ subprojects {
           compile(externalDependency.guava) {
               force = true
           }
-      }
-          compile(externalDependency.commonsCodec) {
-            force = true
-          }
+        }
+        compile(externalDependency.commonsCodec) {
+          force = true
+        }
+        //Since testCompile inherit from compile, so we cannot use testCompile 
to import dependency for log4j
+        customTestCompile externalDependency.log4j
+        customTestCompile externalDependency.slf4jToLog4j
 
         // Required to add JDK's tool jar, which is required to run byteman 
tests.
         testCompile (files(((URLClassLoader) 
ToolProvider.getSystemToolClassLoader()).getURLs()))
       }
+      if (!project.name.contains('gobblin-aws')) {
+        configurations.compile.dependencies*.each {
+          //exclude this jar because we introduce log4j-over-slf4j, these two 
jars cannot present at the same time
+          it.exclude group: 'org.slf4j', module: 'slf4j-log4j12'
+          //exclude log4j related jars to provide a clean log environment
+          it.exclude group: 'log4j', module: 'log4j'
+          it.exclude group: 'log4j', module: 'apache-log4j-extras'
+        }
+      }
       all*.exclude group: 'org.apache.calcite', module: 'calcite-avatica' // 
replaced by org.apache.calcite.avatica:avatica-core
-      //exclude this jar because we introduce log4j-over-slf4j, these two jars 
cannot present at the same time
-      compileClasspath.exclude group: 'org.slf4j', module: 'slf4j-log4j12'

Review comment:
       On Line51 (configurations.compile.dependencies*.each ) I add the config 
to exclude slf4j-log4j12 and log4j related jar.  The reason for using this 
statement is that I find when we call compile.exclude to exclude some jar, the 
published artifacts will still contains that transient dependency. So I use 
this statement to make sure our published artifacts do not contains log4j 
related dependency

##########
File path: gradle/scripts/globalDependencies.gradle
##########
@@ -35,20 +36,36 @@ subprojects {
           compile(externalDependency.guava) {
               force = true
           }
-      }
-          compile(externalDependency.commonsCodec) {
-            force = true
-          }
+        }
+        compile(externalDependency.commonsCodec) {
+          force = true
+        }
+        //Since testCompile inherit from compile, so we cannot use testCompile 
to import dependency for log4j
+        customTestCompile externalDependency.log4j
+        customTestCompile externalDependency.slf4jToLog4j
 
         // Required to add JDK's tool jar, which is required to run byteman 
tests.
         testCompile (files(((URLClassLoader) 
ToolProvider.getSystemToolClassLoader()).getURLs()))
       }
+      if (!project.name.contains('gobblin-aws')) {
+        configurations.compile.dependencies*.each {
+          //exclude this jar because we introduce log4j-over-slf4j, these two 
jars cannot present at the same time
+          it.exclude group: 'org.slf4j', module: 'slf4j-log4j12'
+          //exclude log4j related jars to provide a clean log environment
+          it.exclude group: 'log4j', module: 'log4j'
+          it.exclude group: 'log4j', module: 'apache-log4j-extras'
+        }
+      }
       all*.exclude group: 'org.apache.calcite', module: 'calcite-avatica' // 
replaced by org.apache.calcite.avatica:avatica-core
-      //exclude this jar because we introduce log4j-over-slf4j, these two jars 
cannot present at the same time
-      compileClasspath.exclude group: 'org.slf4j', module: 'slf4j-log4j12'

Review comment:
       On Line51 (configurations.compile.dependencies*.each ) I add the config 
to exclude slf4j-log4j12 and log4j related jar.  The reason for using this 
statement is that I find when we call compile.exclude to exclude some jar, the 
published artifacts will still contains that transient dependency. So I use 
this statement to make sure our published artifacts do not contains log4j 
related dependency

##########
File path: gradle/scripts/globalDependencies.gradle
##########
@@ -35,20 +36,36 @@ subprojects {
           compile(externalDependency.guava) {
               force = true
           }
-      }
-          compile(externalDependency.commonsCodec) {
-            force = true
-          }
+        }
+        compile(externalDependency.commonsCodec) {
+          force = true
+        }
+        //Since testCompile inherit from compile, so we cannot use testCompile 
to import dependency for log4j
+        customTestCompile externalDependency.log4j
+        customTestCompile externalDependency.slf4jToLog4j
 
         // Required to add JDK's tool jar, which is required to run byteman 
tests.
         testCompile (files(((URLClassLoader) 
ToolProvider.getSystemToolClassLoader()).getURLs()))
       }
+      if (!project.name.contains('gobblin-aws')) {
+        configurations.compile.dependencies*.each {
+          //exclude this jar because we introduce log4j-over-slf4j, these two 
jars cannot present at the same time
+          it.exclude group: 'org.slf4j', module: 'slf4j-log4j12'
+          //exclude log4j related jars to provide a clean log environment
+          it.exclude group: 'log4j', module: 'log4j'
+          it.exclude group: 'log4j', module: 'apache-log4j-extras'
+        }
+      }
       all*.exclude group: 'org.apache.calcite', module: 'calcite-avatica' // 
replaced by org.apache.calcite.avatica:avatica-core
-      //exclude this jar because we introduce log4j-over-slf4j, these two jars 
cannot present at the same time
-      compileClasspath.exclude group: 'org.slf4j', module: 'slf4j-log4j12'

Review comment:
       On Line51 (configurations.compile.dependencies*.each ) I add the config 
to exclude slf4j-log4j12 and log4j related jar.  The reason for using this 
statement is that I find when we call compile.exclude to exclude some jar, the 
published artifacts will still contains that transient dependency. So I use 
this statement to make sure our published artifacts do not contains log4j 
related dependency

##########
File path: gradle/scripts/globalDependencies.gradle
##########
@@ -35,20 +36,36 @@ subprojects {
           compile(externalDependency.guava) {
               force = true
           }
-      }
-          compile(externalDependency.commonsCodec) {
-            force = true
-          }
+        }
+        compile(externalDependency.commonsCodec) {
+          force = true
+        }
+        //Since testCompile inherit from compile, so we cannot use testCompile 
to import dependency for log4j
+        customTestCompile externalDependency.log4j
+        customTestCompile externalDependency.slf4jToLog4j
 
         // Required to add JDK's tool jar, which is required to run byteman 
tests.
         testCompile (files(((URLClassLoader) 
ToolProvider.getSystemToolClassLoader()).getURLs()))
       }
+      if (!project.name.contains('gobblin-aws')) {
+        configurations.compile.dependencies*.each {
+          //exclude this jar because we introduce log4j-over-slf4j, these two 
jars cannot present at the same time
+          it.exclude group: 'org.slf4j', module: 'slf4j-log4j12'
+          //exclude log4j related jars to provide a clean log environment
+          it.exclude group: 'log4j', module: 'log4j'
+          it.exclude group: 'log4j', module: 'apache-log4j-extras'
+        }
+      }
       all*.exclude group: 'org.apache.calcite', module: 'calcite-avatica' // 
replaced by org.apache.calcite.avatica:avatica-core
-      //exclude this jar because we introduce log4j-over-slf4j, these two jars 
cannot present at the same time
-      compileClasspath.exclude group: 'org.slf4j', module: 'slf4j-log4j12'

Review comment:
       On Line51 (configurations.compile.dependencies*.each ) I add the config 
to exclude slf4j-log4j12 and log4j related jar.  The reason for using this 
statement is that I find when we call compile.exclude to exclude some jar, the 
published artifacts will still contains that transient dependency. So I use 
this statement to make sure our published artifacts do not contains log4j 
related dependency

##########
File path: gradle/scripts/globalDependencies.gradle
##########
@@ -35,20 +36,36 @@ subprojects {
           compile(externalDependency.guava) {
               force = true
           }
-      }
-          compile(externalDependency.commonsCodec) {
-            force = true
-          }
+        }
+        compile(externalDependency.commonsCodec) {
+          force = true
+        }
+        //Since testCompile inherit from compile, so we cannot use testCompile 
to import dependency for log4j
+        customTestCompile externalDependency.log4j
+        customTestCompile externalDependency.slf4jToLog4j
 
         // Required to add JDK's tool jar, which is required to run byteman 
tests.
         testCompile (files(((URLClassLoader) 
ToolProvider.getSystemToolClassLoader()).getURLs()))
       }
+      if (!project.name.contains('gobblin-aws')) {
+        configurations.compile.dependencies*.each {
+          //exclude this jar because we introduce log4j-over-slf4j, these two 
jars cannot present at the same time
+          it.exclude group: 'org.slf4j', module: 'slf4j-log4j12'
+          //exclude log4j related jars to provide a clean log environment
+          it.exclude group: 'log4j', module: 'log4j'
+          it.exclude group: 'log4j', module: 'apache-log4j-extras'
+        }
+      }
       all*.exclude group: 'org.apache.calcite', module: 'calcite-avatica' // 
replaced by org.apache.calcite.avatica:avatica-core
-      //exclude this jar because we introduce log4j-over-slf4j, these two jars 
cannot present at the same time
-      compileClasspath.exclude group: 'org.slf4j', module: 'slf4j-log4j12'

Review comment:
       On Line51 (configurations.compile.dependencies*.each ) I add the config 
to exclude slf4j-log4j12 and log4j related jar.  The reason for using this 
statement is that I find when we call compile.exclude to exclude some jar, the 
published artifacts will still contains that transient dependency. So I use 
this statement to make sure our published artifacts do not contains log4j 
related dependency




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Issue Time Tracking
-------------------

    Worklog Id:     (was: 483346)
    Time Spent: 2h 10m  (was: 2h)

> Make hive-exec as compileOnly for relevant modules
> --------------------------------------------------
>
>                 Key: GOBBLIN-1256
>                 URL: https://issues.apache.org/jira/browse/GOBBLIN-1256
>             Project: Apache Gobblin
>          Issue Type: Task
>            Reporter: Zihan Li
>            Priority: Major
>          Time Spent: 2h 10m
>  Remaining Estimate: 0h
>
> We want our project only expose slf4j and rely on user to determine which log 
> implementation to be used. And hive-exec has dependency on log4j, so we want 
> to make hive-exec as compileOnly for relevant modules to avoid bring in 
> log4j/log4j-extras dependency for downstream project



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to