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

Remove unused compile dependency in javaconfig x509 sample #6130

Closed
raphaelDL opened this issue Nov 23, 2018 · 6 comments
Closed

Remove unused compile dependency in javaconfig x509 sample #6130

raphaelDL opened this issue Nov 23, 2018 · 6 comments
Assignees
Labels
in: docs An issue in Documentation or samples type: enhancement A general enhancement
Milestone

Comments

@raphaelDL
Copy link
Contributor

raphaelDL commented Nov 23, 2018

When building the project a warning is thrown stating that org.slf4j:slf4j-api is defined in samples/javaconfig/x509/spring-security-samples-javaconfig-x509.gradle but no implementation is given.

If we remove it we get rid of this warning and have a cleaner building process

Should we remove it?

@jgrandja
Copy link
Contributor

@raphaelDL org.slf4j:slf4j-api is actually used as it's brought in as a transitive dependency for org.slf4j:jcl-over-slf4j, org.slf4j:jul-to-slf4j, and org.slf4j:log4j-over-slf4j.

What's the exact warning message you're getting when you run the build?

@raphaelDL
Copy link
Contributor Author

raphaelDL commented Nov 23, 2018

oh god, that’s what I thought...

> Configure project :spring-security-samples-javaconfig-x509 Found slf4j-api dependency but no providers were found. Did you mean to add slf4j-simple? See https://www.slf4j.org/codes.html#noProviders .

that’s the message @jgrandja

@jgrandja
Copy link
Contributor

@raphaelDL I see logback.xml in the project but no logback-classic.jar dependency declared. I think you can add this dependency and remove the other 3x dependencies. See Binding with a logging framework at deployment time.

Give that a try and I think it should resolve the warning.

@raphaelDL
Copy link
Contributor Author

lemme see

raphaelDL added a commit to raphaelDL/spring-security that referenced this issue Nov 23, 2018
This commit removes explicit declaration of slf4j dependencies.
Instead, logback classic is declared that will pull them transitively.

Fixes: spring-projectsgh-6130
@raphaelDL
Copy link
Contributor Author

You're all right, it worked.... I pushed a change @jgrandja. Thank you very much for your suggestion

@raphaelDL
Copy link
Contributor Author

I dropped

	compile 'org.slf4j:jcl-over-slf4j'
 	compile 'org.slf4j:jul-to-slf4j'
 	compile 'org.slf4j:log4j-over-slf4j'
 	compile 'org.slf4j:slf4j-api'

and put

compile 'ch.qos.logback:logback-classic'

instead

@jgrandja jgrandja self-assigned this Nov 23, 2018
@jgrandja jgrandja added Samples type: enhancement A general enhancement labels Nov 23, 2018
@jgrandja jgrandja added this to the 5.2.0.M1 milestone Nov 23, 2018
@rwinch rwinch added in: docs An issue in Documentation or samples and removed in: docs An issue in Documentation or samples labels May 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: docs An issue in Documentation or samples type: enhancement A general enhancement
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants