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

Stefan Seifert commented on SLING-4470:
---------------------------------------

my assumption was that all projects that use the mocks only have reference to 
slf4-api, not any implementation of it. thus it should create no conflict when 
using the mocks which includes slf4j-simple as well with a sensible default 
loglevel setup for the unit tests.

if we remove this dependency or change it to "test" it is not active in the 
project that has the test code and on every project you would have to include 
slf4j-simple and a matching logging configuration yourself to ensure a proper 
logging setup. an option to make this easier would be to create something like 
a "logging-mock" project including this dependency and logger configuration, 
although it seems a bit overhead for just one properties file.

with which other slf4j implementation does it conflict in your project, and is 
it correct that this dependency there?

> OSGi mock has compile time dependency on slf4j-simple
> -----------------------------------------------------
>
>                 Key: SLING-4470
>                 URL: https://issues.apache.org/jira/browse/SLING-4470
>             Project: Sling
>          Issue Type: Bug
>          Components: Testing
>    Affects Versions: Testing OSGi Mock 1.2.0
>            Reporter: Chetan Mehrotra
>            Priority: Minor
>
> org.apache.sling.testing.osgi-mock has a compile time dependency on 
> slf4j-simple which triggers warning by slf4j
> {noformat}
> SLF4J: Class path contains multiple SLF4J bindings.
> SLF4J: Found binding in 
> [jar:file:/home/user/.m2/repository/ch/qos/logback/logback-classic/1.1.0/logback-classic-1.1.0.jar!/org/slf4j/impl/StaticLoggerBinder.class]
> SLF4J: Found binding in 
> [jar:file:/home/user/.m2/repository/org/slf4j/slf4j-simple/1.7.6/slf4j-simple-1.7.6.jar!/org/slf4j/impl/StaticLoggerBinder.class]
> SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an 
> explanation.
> {noformat}
> Scope for slf4j-simple should be test or provided



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

Reply via email to