question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Enabling FindBugs in a Gradle build fails the build

See original GitHub issue

Hi,

Enabling Run FindBugs in a build results in Gradle failing.

2016-12-12T01:01:10.6511558Z ##[debug]checkstyleAnalysisEnabled=true
2016-12-12T01:01:10.6591558Z Checkstyle analysis is enabled.
2016-12-12T01:01:10.6591558Z ##[debug]C:\a\1\s\gradlew.bat arg: ["-I","C:\\a\\_tasks\\Gradle_8d8eebd8-2b94-4c97-85af-839254cc6da4\\1.0.71\\CodeAnalysis\\checkstyle.gradle"]
2016-12-12T01:01:10.6591558Z ##[debug]findbugsAnalysisEnabled=true
2016-12-12T01:01:10.6591558Z FindBugs analysis is enabled.
2016-12-12T01:01:10.6591558Z ##[debug]C:\a\1\s\gradlew.bat arg: ["-I","C:\\a\\_tasks\\Gradle_8d8eebd8-2b94-4c97-85af-839254cc6da4\\1.0.71\\CodeAnalysis\\findbugs.gradle"]
2016-12-12T01:01:10.6601558Z ##[debug]pmdAnalysisEnabled=true
2016-12-12T01:01:10.6601558Z PMD analysis is enabled.
2016-12-12T01:01:10.6601558Z ##[debug]C:\a\1\s\gradlew.bat arg: ["-I","C:\\a\\_tasks\\Gradle_8d8eebd8-2b94-4c97-85af-839254cc6da4\\1.0.71\\CodeAnalysis\\pmd.gradle"]
2016-12-12T01:01:10.6601558Z ##[debug]exec tool: C:\a\1\s\gradlew.bat
2016-12-12T01:01:10.6601558Z ##[debug]Arguments:
2016-12-12T01:01:10.6611558Z ##[debug]   --no-daemon
2016-12-12T01:01:10.6611558Z ##[debug]   --stacktrace
2016-12-12T01:01:10.6611558Z ##[debug]   clean
2016-12-12T01:01:10.6611558Z ##[debug]   check
2016-12-12T01:01:10.6611558Z ##[debug]   -I
2016-12-12T01:01:10.6611558Z ##[debug]   C:\a\_tasks\Gradle_8d8eebd8-2b94-4c97-85af-839254cc6da4\1.0.71\CodeAnalysis\checkstyle.gradle
2016-12-12T01:01:10.6611558Z ##[debug]   -I
2016-12-12T01:01:10.6611558Z ##[debug]   C:\a\_tasks\Gradle_8d8eebd8-2b94-4c97-85af-839254cc6da4\1.0.71\CodeAnalysis\findbugs.gradle
2016-12-12T01:01:10.6611558Z ##[debug]   -I
2016-12-12T01:01:10.6611558Z ##[debug]   C:\a\_tasks\Gradle_8d8eebd8-2b94-4c97-85af-839254cc6da4\1.0.71\CodeAnalysis\pmd.gradle
2016-12-12T01:01:10.6611558Z [command]C:\a\1\s\gradlew.bat --no-daemon --stacktrace clean check -I C:\a\_tasks\Gradle_8d8eebd8-2b94-4c97-85af-839254cc6da4\1.0.71\CodeAnalysis\checkstyle.gradle -I C:\a\_tasks\Gradle_8d8eebd8-2b94-4c97-85af-839254cc6da4\1.0.71\CodeAnalysis\findbugs.gradle -I C:\a\_tasks\Gradle_8d8eebd8-2b94-4c97-85af-839254cc6da4\1.0.71\CodeAnalysis\pmd.gradle

Then

016-12-12T01:01:24.8973344Z FAILURE: Build failed with an exception.
2016-12-12T01:01:24.8973344Z 
2016-12-12T01:01:24.8973344Z * What went wrong:
2016-12-12T01:01:24.8973344Z Could not read initialization script 'C:\a\_tasks\Gradle_8d8eebd8-2b94-4c97-85af-839254cc6da4\1.0.71\CodeAnalysis\findbugs.gradle' as it does not exist.
2016-12-12T01:01:24.8973344Z 
2016-12-12T01:01:24.8973344Z * Try:
2016-12-12T01:01:24.8973344Z Run with --info or --debug option to get more log output.
2016-12-12T01:01:24.8973344Z 
2016-12-12T01:01:24.8973344Z * Exception is:
2016-12-12T01:01:24.9333277Z org.gradle.api.resources.MissingResourceException: Could not read initialization script 'C:\a\_tasks\Gradle_8d8eebd8-2b94-4c97-85af-839254cc6da4\1.0.71\CodeAnalysis\findbugs.gradle' as it does not exist.
2016-12-12T01:01:24.9333277Z 	at org.gradle.internal.resource.UriTextResource.getAsReader(UriTextResource.java:110)

I’d note that the CheckStyle and PMD options work. It looks like the FindBugs file is simply missing.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:8 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
madhurigcommented, Jan 23, 2017

@baylisscg: VSTS deployment completed on 1/19. Please try and let us know if you have the fix now.

Thanks, Madhuri

1reaction
davidstahelicommented, Jan 12, 2017

Apologies for this bug! It was fixed with pull request #3148. Unfortunately it was not hot-fixed in production, and because of the holidays, deployment of the fix to production did not take place until this week. If it has not already arrived for your account, it should by Saturday. If you let me know the name of your accounts (account.visualstudio.com), I can tell you when the fix should be available.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Findbugs Gradle plugin won't fail the build - Stack Overflow
I used this answer How to write a customized gradle task to not to ignore Findbugs violations but fail after the analysis is...
Read more >
Task cache enabled with findbugs causes the build to fail
I have a project where we've enabled the task cache, and attempting to configure the findbugs plugin so that is also cached.
Read more >
Gradle Whirlwind Introduction
build.gradle - This is the Gradle build file. It specifies which tasks to run, which plugins to use, and a few settings.
Read more >
How to add Checkstyle and FindBugs plugins in a gradle ...
2. Enabling FindBugs plugin ... Add the following lines to build.gradle file. ... ignoreFailures — Whether to allow the build to continue if...
Read more >
Configuration - Gradle quality plugin
You may use reporting disabling to speed up build a bit. In most cases (when you don't have thousands of errors) console reporting...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found