You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Shikhar Bhushan (JIRA)" <ji...@apache.org> on 2013/06/26 23:53:21 UTC

[jira] [Commented] (SOLR-4379) solr-core has a dependency to slf4j-jdk14 and is not binding agnostic

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

Shikhar Bhushan commented on SOLR-4379:
---------------------------------------

This is quite problematic, if you are transitively pulling in {{solr-core}}'s dependencies you'd get {{slf4j-jdk14}} on the classpath, and slf4j complains (not to speak of the potential for it selecting the wrong binding):

{noformat}
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:<redacted>/slf4j-log4j12-1.7.5.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:<redacted>/lib/slf4j-jdk14-1.7.5.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [org.slf4j.impl.Log4jLoggerFactory]
{noformat}

The fix should I think be as simple as adding {{<scope>runtime</scope>}} for {{slf4j-jdk14}} in the solr-core POM.
                
> solr-core has a dependency to slf4j-jdk14 and is not binding agnostic
> ---------------------------------------------------------------------
>
>                 Key: SOLR-4379
>                 URL: https://issues.apache.org/jira/browse/SOLR-4379
>             Project: Solr
>          Issue Type: Improvement
>    Affects Versions: 4.1
>            Reporter: Nicolas Labrot
>            Priority: Minor
>
> solr-core can be used as a dependency in other projects which used others binding. In these cases slf4j-jdk14 must be excluded
> In my opinion it may be better to move the slf4j-jdk14 dependency from solr-core to the war project. 
> solr-core will be binding agnostics.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org