Uploaded image for project: 'ActiveMQ Classic'
  1. ActiveMQ Classic
  2. AMQ-5756

RAR declares dependency on slf4j-log4j, should declare dependency on slf4-api instead

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Abandoned
    • 5.11.1
    • None
    • RAR

    Description

      activemq-rar seems to declare a dependency on org.slf4j:slf4j-log4j12, which is the log4j binding. Because of that, the following two files end up inside the released JAR:

      • slf4j-api-1.7.10.jar
      • slf4j-log4j12-1.7.10.jar

      This is problematic, because it enforces a logging framework on users of activemq-rar. I am using activemq-rar in a Glassfish JavaEE container and the correct binding would be slf4j-jdk14. However, because activemq-rar ships another binding, Glassfish sees the binding shipped with activemq-rar first on the classpath and therefore does not use the binding I want to use.

      The slf4j manual clearly states:

      Embedded components such as libraries or frameworks should not declare a dependency on any SLF4J binding but only depend on slf4j-api. When a library declares a transitive dependency on a specific binding, that binding is imposed on the end-user negating the purpose of SLF4J. Note that declaring a non-transitive dependency on a binding, for example for testing, does not affect the end-user.

      (Source: http://slf4j.org/manual.html)

      This rule is currently broken by activemq-rar.

      Please remove the dependency on slf4j-log4j and replace it with a dependency on slf4j-api.

      Thank you very much in advance for your efforts!

      Attachments

        Activity

          People

            Unassigned Unassigned
            sebastian@2007.org Sebastian Boschert
            Votes:
            2 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: