Gradle 1.11 findbugs plugin on a new project produces report with invalid SrcDir


(Ramon Nogueira) #1

This is on a totally fresh Gradle 1.11 project with a single Java source file and the findbugs plugin.

Here’s an excerpt from the report. Note SrcDir is pointing to a .java file. In the Maven-generated report for the same project, it points to the source root. The Jenkins finbugs parser complains bitterly in the logs about this and links don’t work etc.

<BugCollection version="2.0.1" sequence="0" timestamp="1395169659194" analysisTimestamp="1395169659213" release="">
  <Project projectName="">
    <Jar>/[...]/build/classes/main/test/MyTestClass.class</Jar>
    <AuxClasspathEntry>/[...]/.gradle/caches/modules-2/files-2.1/org.slf4j/slf4j-api/1.7.5/6b262da268f8ad9eff941b25503a9198f0a0ac93/slf4j-api-1.7.5.jar</AuxClasspathEntry>
    <SrcDir>/[...]/src/main/java/test/MyTestClass.java</SrcDir>
  </Project>
...