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

Gradle replaces SLF4J-API 1.7.36 with 2.0.7, causing warning about no providers in wiremock-standalone #2415

Closed
tpearsonbray opened this issue Oct 4, 2023 · 2 comments

Comments

@tpearsonbray
Copy link

Proposal

WireMock depends on slf4j-api:1.7.36 and WireMock standalone depends on slf4j-noop:1.7.36

As WireMock dependencies use other versions ofslf4j-api, Gradle resolves the versions to the latest:
Partial output of gradlew dependencies
Partial output of gradlew dependencies

It does not change the version of slf4j-noop, resulting in a mismatch and a warning that there are no providers since SLF4J 2+ expects providers to be loaded via SPI.

image

The warning can be resolved specifying the provider wiremock.org.slf4j.helpers.NOP_FallbackServiceProvider in META-INF/services/wiremock.org.slf4j.spi.SLF4JServiceProvider.

Reproduction steps

  1. Create a project with wiremock-standalone as a test dependency
  2. Start a WireMock server in the test
  3. Observe the SLF4J warning

References

#1964

A portion of wiremock.org.slf4j.LoggerFactory in wiremock-standalone 3.2.0 showing the URL constant for the ignoredBindings warning:
image

@oleg-nenashev
Copy link
Member

Thanks for reporting!

Xabibax added a commit to Xabibax/wiremock that referenced this issue Oct 16, 2023
…ing warning about no providers in wiremock-standalone
@Xabibax
Copy link
Contributor

Xabibax commented Oct 16, 2023

I did it in #2449

henrik242 pushed a commit to henrik242/wiremock that referenced this issue Nov 10, 2023
…ing warning about no providers in wiremock-standalone (wiremock#2449)
Marvin9 pushed a commit to Marvin9/wiremock that referenced this issue Nov 20, 2023
…ing warning about no providers in wiremock-standalone (wiremock#2449)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants