[weld-issues] [JBoss JIRA] (WELD-1109) weld-servlet.jar should NOT contain slf4j (still found in 2.0.0.Alpha1)

Andrew Hughes (JIRA) jira-events at lists.jboss.org
Wed Apr 18 07:26:18 EDT 2012


    [ https://issues.jboss.org/browse/WELD-1109?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12685218#comment-12685218 ] 

Andrew Hughes commented on WELD-1109:
-------------------------------------

bq. So I don't see why slf4j should get a special treatment.

Because slf4j (as good as it is) is not part of the jre. Additionally, weld-servlet-core (to the best of my knowledge) does not offer maven dependency resolution (the standard modularization mechanism for, maven, you can wrap this in osgi if you like) weld-servlet-core (or another module) could fix this issue for maven projects. But currently it does not. I would recommend a solution that is not based on the shade plugin, but by maven dependency resolution.

My personal 2c...

I'm Happy to see this resolved as 'won't fix', because jBoss have voting enabled on this jira instance. If by chance others feel that this is in fact a valid issue I suggest you vote :) 
                
> weld-servlet.jar should NOT contain slf4j (still found in 2.0.0.Alpha1)
> -----------------------------------------------------------------------
>
>                 Key: WELD-1109
>                 URL: https://issues.jboss.org/browse/WELD-1109
>             Project: Weld
>          Issue Type: Bug
>          Components: Weld SPI
>    Affects Versions: 2.0.0.Alpha1
>         Environment: WELD-845
>            Reporter: Andrew Hughes
>            Priority: Critical
>              Labels: slf4j
>   Original Estimate: 4 hours
>  Remaining Estimate: 4 hours
>
> NOTE: This is intentionally a duplicate of WELD-845 (because I believe you should fix this in BOTH 1.1.7+ and 2.0.0).
> Please fix this in v2.0.0, v1.1.x is something others might care to comment on...
> Inheriting weld-servlet-2.0.0.Alpha1.jar or earlier (as a dependency) should not include the org.slf4j.** classes. Because it precludes the consuming project from (easily) selecting which slf4j binding they want to use. I recognise that it is "convenient" to include these classes because they are quite common in use and maybe also quite necessary for weld. However, it's very likely to raise slf4j binding collisions (http://www.slf4j.org/codes.html#multiple_bindings). Especially with other 3rd party dependencies having their own slf4j dependencies. It's also likely that this will affect future projects more so than current projects (i.e. this problem wont simply 'go away'). What would happen if every jar did this???? What if the JRE did this????
> Please remove these classes from the artifact, and please include them in the maven pom.xml as dependencies (this allows an easy <exclusion> for maven users to fix the slf4j collision).
> Warning (using 1.1.7, but 2.0.0.Alpha contains the same classes):
> {{
> SLF4J: Class path contains multiple SLF4J bindings.
> SLF4J: Found binding in [jar:file:/C:/dev/workspace/workspace3.7/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/acme-project/WEB-INF/lib/slf4j-jdk14-1.6.2.jar!/org/slf4j/impl/StaticLoggerBinder.class]
> SLF4J: Found binding in [jar:file:/C:/dev/workspace/workspace3.7/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/acme-project/WEB-INF/lib/weld-servlet-1.1.7.Final.jar!/org/slf4j/impl/StaticLoggerBinder.class]
> SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
> }}

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

        


More information about the weld-issues mailing list