Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-10217

Remove logging implementations from compile scope

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Trivial
    • Resolution: Fixed
    • None
    • 2.18.0
    • None
    • None
    • Unknown

    Description

      Some components include logging implementations among their dependencies. If it is applicable (eg. if they are not hardcoded), they should be removed.

      A quick script:

      for comp in $(ls | grep "camel-" | grep -v ".iml"); do
      	cd $comp
      	mvn dependency:tree | grep 'log4j\|logback\|slf4j-simple\|slf4j-jdk14\|slf4j-log4j12' | grep -v test | xargs -I line echo "$(pwd) line"
      	cd ..
      done
      

      Shows the following problems:

      ./camel/components/camel-atmos [INFO] |  +- log4j:log4j:jar:1.2.17:compile
      ./camel/components/camel-gora [INFO] |  +- org.slf4j:slf4j-log4j12:jar:1.7.21:compile
      ./camel/components/camel-gora [INFO] |  - log4j:log4j:jar:1.2.17:compile
      ./camel/components/camel-hbase [INFO] |  +- log4j:log4j:jar:1.2.17:compile
      ./camel/components/camel-jbpm [INFO] +- org.slf4j:slf4j-log4j12:jar:1.7.21:compile
      ./camel/components/camel-jbpm [INFO] |  - log4j:log4j:jar:1.2.17:compile
      ./camel/components/camel-jt400 [INFO] +- org.slf4j:slf4j-log4j12:jar:1.7.21:compile
      ./camel/components/camel-jt400 [INFO] |  - log4j:log4j:jar:1.2.17:compile
      ./camel/components/camel-krati [INFO] |  - log4j:log4j:jar:1.2.17:compile
      ./camel/components/camel-openshift [INFO] |  - log4j:log4j:jar:1.2.17:compile
      ./camel/components/camel-salesforce [INFO] +- log4j:log4j:jar:1.2.17:compile
      ./camel/components/camel-scr [INFO] +- org.slf4j:slf4j-log4j12:jar:1.7.21:compile
      ./camel/components/camel-scr [INFO] +- log4j:log4j:jar:1.2.17:compile
      ./camel/components/camel-spark [INFO] |  +- log4j:log4j:jar:1.2.17:compile
      ./camel/components/camel-spark [INFO] |  |  +- log4j:apache-log4j-extras:jar:1.2.17:compile
      ./camel/components/camel-spark-rest [INFO] |  +- org.slf4j:slf4j-simple:jar:1.7.21:compile
      ./camel/components/camel-spring-boot [INFO] |  |  +- ch.qos.logback:logback-classic:jar:1.1.7:compile
      ./camel/components/camel-spring-boot [INFO] |  |  |  - ch.qos.logback:logback-core:jar:1.1.7:compile
      ./camel/components/camel-spring-boot [INFO] |  |  - org.slf4j:log4j-over-slf4j:jar:1.7.21:compile
      ./camel/components/camel-spring-boot-starter [INFO] |  |  +- ch.qos.logback:logback-classic:jar:1.1.7:compile
      ./camel/components/camel-spring-boot-starter [INFO] |  |  |  - ch.qos.logback:logback-core:jar:1.1.7:compile
      ./camel/components/camel-spring-boot-starter [INFO] |  |  - org.slf4j:log4j-over-slf4j:jar:1.7.21:compile
      ./camel/components/camel-zipkin-starter [INFO] |  |  +- ch.qos.logback:logback-classic:jar:1.1.7:compile
      ./camel/components/camel-zipkin-starter [INFO] |  |  |  - ch.qos.logback:logback-core:jar:1.1.7:compile
      ./camel/components/camel-zipkin-starter [INFO] |  |  - org.slf4j:log4j-over-slf4j:jar:1.7.21:compile
      ./camel/components/camel-zookeeper [INFO] |  +- log4j:log4j:jar:1.2.17:compile
      

      Spring-boot starters are allowed to have logging implementations. org.slf4j:log4j-over-slf4j is not an implementation.

      Attachments

        Issue Links

          Activity

            People

              nferraro Nicola Ferraro
              nferraro Nicola Ferraro
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: