[ 
https://issues.apache.org/jira/browse/AMQ-5756?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14523403#comment-14523403
 ] 

Hiram Chirino commented on AMQ-5756:
------------------------------------

The problem is that a RAR is not a library that is used directly by end user 
apps. It's a deployment unit which would not have proper logging other JEE 
containers that don't support slf4j. The current setup is the correct default 
to work out of the box in most containers. You are free to modify the RAR if 
you don't like the default. 

> RAR declares dependency on slf4j-log4j, should declare dependency on slf4-api 
> instead
> -------------------------------------------------------------------------------------
>
>                 Key: AMQ-5756
>                 URL: https://issues.apache.org/jira/browse/AMQ-5756
>             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: 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!



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to