-
Notifications
You must be signed in to change notification settings - Fork 564
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
Findbugs library should not be distributed to client apps #389
Findbugs library should not be distributed to client apps #389
Conversation
…buted to client apps.
@lfradin I don't think we should remove this dependency. This specific library is not Firebug itself, but is "jsr305.jar" that contains annotations like |
@asolntsev, this is not removing the findbugs (jsr305) library. This is just making sure it is used by flyingsaucer, but not forced upon lient apps. Client apps should be responsible to decide which annotation library to use. This is best practice. Also Findbugs (jsr305) has been superseded by spotbugs since 2017 (https://mvnrepository.com/artifact/com.github.spotbugs). See comment https://stackoverflow.com/a/67415527. And project link https://spotbugs.github.io/. Now I agree that removing this dependency might break some application builds which used flyingsaucer, added the |
@lfradin Look what I mean. JSR305 contains annotations like If I exclude JSR305 dependency like this: implementation("org.xhtmlrenderer:flying-saucer-pdf:9.9.3") {
exclude group:'com.google.code.findbugs'
} then IDE doesn't show such warnings anymore: |
Hi @asolntsev. Indeed, I am aware of this behavior. Note that Google Guava went through this process in the past in Guava 13 (https://github.com/google/guava/wiki/Release13#non-api-changes). |
OK, @asolntsev, if you are not convinced that's OK. I'll close my pull request. |
@lfradin No-no, I am totally open for dialog. And yes, I also feel that libraries like "jsr305" which are not needed for running production code should not get to production build. |
Hello @asolntsev. |
superseded by #407 |
The findbugs library is only required at build time. It should never be packaged in a distributed client application. Right now flyingsaucer depends on findbugs with a
compile
scope, which means every application using flyingsaucer will automatically inherit the dependency, and fingbugs will end in the packaged application (fat jar, war, ...).The solution is to set its scope to
provided
, as recommended by various sources including https://stackoverflow.com/a/26868773.This will avoid the burden for every application to exclude the findbugs dependency from flyingsaucer.