-
-
Notifications
You must be signed in to change notification settings - Fork 68
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
Spotbugs 2.0 breaks if Guava is on the plugin classpath #166
Comments
Instead of working around, the spotbugs plugin should either
Whichever fits its use case better. Please don't use internals like this. |
IIRC from #57 and #100 , Worker API would be nice but unless the statefulness mentioned by @Vampire in #100 is fixed then Worker API is probably not an option. |
I didn't read the whole history here, just got here because of the mention. As I said in #100 already, I think a combination of worker API with |
Please refer #180 and try the new implementation, it should work. If it still faces problem, please share it at here. |
I'll close this inactive issue. If you could reproduce this with the latest release, please feel free to reopen. |
If spotbugs-gradle-plugin 2.0 is used in addition to any other plugin that uses an older Guava on the classpath, the build can fail as this plugin has somehow forced Gradle's Guava off of Gradle's classpath.
I have a reproducer at https://github.com/isker/spotbugs-guava-failure. See
build.gradle
for all that's needed to trigger this failure.@oehme notes that this is due to the usage of many internal worker APIs and ClassLoader manipulation in this plugin, for example:
spotbugs-gradle-plugin/src/main/java/com/github/spotbugs/internal/spotbugs/SpotBugsExecutor.java
Lines 14 to 28 in 1a72b92
spotbugs-gradle-plugin/src/main/java/com/github/spotbugs/internal/spotbugs/SpotBugsWorkerManager.java
Lines 8 to 10 in 1a72b92
This is a blocker to upgrading Gradle to 6.0 in any project that uses spotbugs and an older Guava on the buildscript classpath, as there is a 5.x deprecation warning that is fixed only in version 2.0 of this plugin on this line:
spotbugs-gradle-plugin/src/main/java/com/github/spotbugs/internal/SpotBugsReportsImpl.java
Line 14 in bb58cf3
A potential workaround is to force resolution to a higher version of Guava (ideally the same one used in Gradle itself) on the buildscript classpath.
The text was updated successfully, but these errors were encountered: