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

Neil Hooey commented on SOLR-2487:
----------------------------------

If you're using Maven to build a Solr project, you can add these lines to the 
{{<plugins>}} section to eliminate slf4j bindings that come from Solr 
dependencies:

{code}
<plugin>
  <artifactId>maven-war-plugin</artifactId>
  <version>2.2</version>
  <configuration>
    <packagingExcludes>WEB-INF/lib/slf4j-jdk14-1.6.4.jar</packagingExcludes>
  </configuration>
</plugin>
{code}

If you have the setting {{<packaging>war</packaging>}}, Maven will strip the 
slf4j jar from the built war in {{target/}} and should clear the way for your 
logback or other loggers to function properly.
                
> Do not include slf4j-jdk14 jar in WAR
> -------------------------------------
>
>                 Key: SOLR-2487
>                 URL: https://issues.apache.org/jira/browse/SOLR-2487
>             Project: Solr
>          Issue Type: Improvement
>          Components: Build
>    Affects Versions: 3.2, 4.0
>            Reporter: Jan Høydahl
>            Assignee: Jan Høydahl
>              Labels: logging, slf4j
>             Fix For: 3.6, 4.0
>
>         Attachments: SOLR-2487.patch, SOLR-2487.patch, SOLR-2487.patch
>
>
> I know we've intentionally bundled slf4j-jdk14-1.5.5.jar in the war to help 
> newbies get up and running. But I find myself re-packaging the war for every 
> customer when adapting to their choice of logger framework, which is 
> counter-productive.
> It would be sufficient to have the jdk-logging binding in example/lib to let 
> the example and tutorial still work OOTB but as soon as you deploy solr.war 
> to production you're forced to explicitly decide what logging to use.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to