activemq-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sebastian Boschert (JIRA)" <>
Subject [jira] [Commented] (AMQ-5756) RAR declares dependency on slf4j-log4j, should declare dependency on slf4-api instead
Date Fri, 01 May 2015 16:35:07 GMT


Sebastian Boschert commented on AMQ-5756:

It will work out of the box without any logger bindings. It will just not log anything. If
someone wants the log output, they can easily add the necessary binding to their classpath.
The current default may work with a few, but not all containers. I find it very rude of RAR
to clutter my classpath with a logger binding that I don't need and - even worse - that effectively
disables my application's own logging.

> RAR declares dependency on slf4j-log4j, should declare dependency on slf4-api instead
> -------------------------------------------------------------------------------------
>                 Key: AMQ-5756
>                 URL:
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: RAR
>    Affects Versions: 5.11.1
>            Reporter: Sebastian Boschert
>            Priority: Minor
>              Labels: easyfix
> 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:
> {quote}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.{quote}
> (Source:
> 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!

This message was sent by Atlassian JIRA

View raw message