wkennedy / swagger4spring-web

Swagger support for Spring MVC
89 stars 46 forks source link

SLF4J framework bindings should not be specified as compile-time dependencies #23

Closed mike-gallagher-sdg closed 11 years ago

mike-gallagher-sdg commented 11 years ago

The POM for swagger4spring-web specifies a compile-time dependency on the SLF4J frameworks 'logback-classic' and 'logback-core'.

The presence of the bindings for logback-* cause a conflict when an application (using swagger4spring-web) specifies an alternate SLF4J binding. This conflict can cause the application-specified SLF4J binding to be ignored in favor of the binding specified by swagger4spring-web.

The following excerpt from the SLF4J documentation (http://www.slf4j.org/codes.html#multiple_bindings) indicates why the compile-time bindings should be removed:

"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 compile-time dependency on a SLF4J binding, it imposes that binding on the end-user, thus negating SLF4J's purpose. When you come across an embedded component declaring a compile-time dependency on any SLF4J binding, please take the time to contact the authors of said component/library and kindly ask them to mend their ways."

wkennedy commented 11 years ago

Thank you for pointing this out. I checked in a change that updates the scope of several dependencies.