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

JGit cannot find org.slf4j.impl.StaticLoggerBinder due to relocation #203

Closed
lynxplay opened this issue Feb 11, 2022 · 6 comments · Fixed by #204
Closed

JGit cannot find org.slf4j.impl.StaticLoggerBinder due to relocation #203

lynxplay opened this issue Feb 11, 2022 · 6 comments · Fixed by #204

Comments

@lynxplay
Copy link
Contributor

lynxplay commented Feb 11, 2022

The gradle git properties plugin relocates the entire grgit library to a prefixed gradlegitproperties package.

Due to the nature of the shadow plugin, the slf4j-api included by jgit also has its import for org.slf4j.impl.StaticLoggerBinder relocated to gradlegitproperties.org.slf4j.impl.StaticLoggerBinder. As a result of this, the plugin does not find the gradle logging implementation when running, causing the rather unfortunate error message:

SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
@remal
Copy link

remal commented Feb 23, 2022

@n0mer could you please exclude slf4j from the relocation process to make the plugin use Gradle's logging infrastructure?

@n0mer
Copy link
Owner

n0mer commented Feb 23, 2022

@remal Semyon can you submit PR for this feature request , with test cases

@lynxplay
Copy link
Contributor Author

Is there anything that I can do to speed up resolving this issue ? I understand if the PR I proposed (especially regarding the integration testing) is not ready for a merge as is, I'd be happy to work with the maintainers here to get this or a similar fix merged.

@tha2015
Copy link
Collaborator

tha2015 commented May 1, 2022

Can you please help to test v2.4.1? Thanks
https://plugins.gradle.org/plugin/com.gorylenko.gradle-git-properties

@remal
Copy link

remal commented May 1, 2022

I confirm it works fine now, thanks!

@lynxplay
Copy link
Contributor Author

lynxplay commented May 1, 2022

Can confirm this properly works on my end as well :) Thank you for the quick merge 👍

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.

4 participants