I am trying to get the FindBugs ant task to include the source information in the generated report.
<findbugs home="${findbugs.home}" output="xml" outputFile="${basedir}/findbugs/findbugs-${package.basename}.xml" excludeFilter="${basedir}/findbugsExclude.xml" jvmargs="-Xmx1048m">
<sourcePath path="${package.srcdir}" />
<class location="${package}" />
<auxClasspath>
<path refid="findbugs.auxinput" />
</auxClasspath>
</findbugs>
The value of the attribute $ {package.srcdir} is correct as far as I can see; it points to the root of the source tree that $ {package.srcdir} /com/mydomain/MyClass.java is the path to the source file.
Generated reports contain an element <SrcDir>that corresponds to the source path specified in the ant task, therefore, apparently, the element is <sourcePath>processed by the findbugs task. Despite this, the package statistics in the XML reports contain only sourceFile="<Unknown>".
Am I missing something obvious?
source
share