-
Bug
-
Resolution: Fixed
-
Major
-
None
-
Jenkins 1.615 running on Windows 7 Enterprise SP1 on X64
Findbugs Plugin 4.6.0
PMD Plugin 3.41
Static Analysis Collector Plugin 1.43
Static Analysis Utilities 1.71
Maven 3.3.3
Findbugs 3.0.1
After getting a small Maven demonstration project working within Jenkins, I attempted to add the static analysis reports, installing the Static Analysis Utilities and Collector and the Findbugs Plugin. I tried several settings but was never able to see a FindBugs report on the Jenkins build status page, and eventually noticed that the 'Maven-generated site' link disappeared from the left-hand side of my project links.
Ultimately I traced this down to: If "Publish Findbugs analysis results" is checked in the Build Settings area below "Add post-build step", no link is generated; if it is unchecked, the Maven web site link appears.
The log files are instructive: near the end of a successful build I see the following, which seems to show the web site tree copy to where Jenkins stores the web site:
00:01:02.137 [INFO] Cobertura Report generation was successful.
00:01:02.137 [INFO] Generating "CPD" report — maven-pmd-plugin:3.4:cpd
00:01:02.168 [INFO] Generating "PMD" report — maven-pmd-plugin:3.4:pmd
00:01:02.324 [JENKINS] Archiving site from C:\Program Files (x86)\Jenkins\workspace\VizCommon\target\site to C:\Program Files (x86)\Jenkins\jobs\VizCommon\site
Near the end of a failed build I see this instead
00:01:04.536 [INFO] Generating "CPD" report — maven-pmd-plugin:3.4:cpd
00:01:04.581 [INFO] Generating "PMD" report — maven-pmd-plugin:3.4:pmd
00:01:05.345 log4j:WARN No appenders could be found for logger (org.apache.commons.digester3.Digester.sax).
00:01:05.345 log4j:WARN Please initialize the log4j system properly.
00:01:06.534 [WARNING] Using default org.dom4j.DocumentFactory
00:01:06.553 [WARNING] Using default org.dom4j.DocumentFactory
00:01:06.595 [WARNING] Using default org.dom4j.DocumentFactory
00:01:06.596 [WARNING] Using default org.dom4j.DocumentFactory
00:01:06.885 [WARNING] Failed to notify spy hudson.maven.Maven3Builder$JenkinsEventSpy: null
00:01:06.885 [INFO]
00:01:06.885 [INFO] — maven-resources-plugin:2.6:resources (default-resources) @ viz-common —
Note that I only enabled Findbugs reporting, even though Maven successfully generates the PMD and Cobertura reports (I had installed the Cobertura plugin but first disabled, then uninstalled it. I suspect the problem is with Findbugs (see PMD test below).
I thought this might be related to JENKINS-26923, which suggested a problem with common-io (although I believe my version of the SA tool includes that bug's fix); so I stopped Jenkins, renamed commons-io-2.2.jar and restarted; but re-running a "Publish Findbugs" build still presented the log4j and dom4j warnings and no web site.
I suspect (or hope) these errors are not only causing the Maven web site to not be published, but may be why I never saw a link to Findbugs reports.
I did also try the case where "Publish PMD analysis results" is checked (only, with the Findbugs box unchecked). In that case I saw the log4j warnings, but not the dom4j warnings; the web site did publish - and I also got a PMD link.