Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dependency of kompendium-core on logback #412

Closed
ospier opened this issue Jan 31, 2023 · 1 comment · Fixed by #413
Closed

Dependency of kompendium-core on logback #412

ospier opened this issue Jan 31, 2023 · 1 comment · Fixed by #413

Comments

@ospier
Copy link

ospier commented Jan 31, 2023

In an application, we use kompendium to generate an OpenAPI spec for our REST API. And we use slf4j with log4j as backend for logging. After an upgrade from kompendium 2.3.5 to 3.9.0, we experienced the problem that slf4j found multiple bindings (log4j and logback) and it picked logback instead of log4j.

We solved the problem in our application by excluding the logback dependency (like suggested in the slf4j docs: https://www.slf4j.org/codes.html#multiple_bindings) in our gradle build file:

    implementation("io.bkbn:kompendium-core") {
        exclude(group = "ch.qos.logback")
    }

However, I would expect a library like kompendium to not add transitive dependencies to a specific logging provider. In fact, if I'm not mistaken, kompendium (or at least kompendium-core) does not even use logback (or any logging, for that matter). So maybe this dependency can simply be removed?

@brizzbuzz brizzbuzz mentioned this issue Jan 31, 2023
14 tasks
@brizzbuzz
Copy link
Contributor

huh... not clear to me why this happens since logback was defined as an implementation dependency, and not an api dependency, but gradle dep management is weird.

Anyway, I think you're right in that Kompendium doesn't need logback since we don't do any logging, so I removed it in the PR above. Will roll out a patch release in a minute, should be 3.11.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants