I suspect this issue to be also the cause for the findbugs plug-in failing on a
multi-module configuration as described here:
http://mojo.codehaus.org/findbugs-maven-plugin/examples/multi-module-config.html
I have set up a multi-module project with findbugs as described in the link
above. It works fine from the command line, using mvn:site, but fails on hudson.
My parent POM:
...
<extensions>
<extension>
<groupId>myconfig</groupId>
<artifactId>myconfig-findbugs</artifactId>
<version>1.0-SNAPSHOT</version>
</extension>
</extensions>
...
<reporting>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>findbugs-maven-plugin</artifactId>
<version>2.0-SNAPSHOT</version>
<configuration>
<xmlOutput>true</xmlOutput>
<findbugsXmlOutput>true</findbugsXmlOutput>
<excludeFilterFile>findbugs-exclude.xml</excludeFilterFile>
<effort>Min</effort>
</configuration>
</plugin>
</plugins>
</reporting>
...
Error in hudson while executing findbugs on a module:
[INFO] Preparing findbugs:findbugs
[INFO] [resources:resources]
[INFO] Using default encoding to copy filtered resources.
[INFO] [compiler:compile]
[INFO] Nothing to compile - all classes are up to date
[INFO] [findbugs:findbugs]
[INFO] Using source root:
[INFO] C:\Projekte\HudsonHome\jobs\Magellan-Basis -
Core\workspace\trunk\core-messaging\target\classes
[INFO] Using minimum effort.
[INFO] No threshold provided, using default threshold.
[INFO] Using FindBugs Version: 1.3.2
[INFO] No threshold provided, using default threshold.
[INFO] No threshold provided, using default threshold.
[INFO] No threshold provided, using default threshold.
[INFO] Using the xdoc format
[INFO] Using minimum effort.
[INFO] No threshold provided, using default threshold.
[INFO] No threshold provided, using default threshold.
[INFO] coreplugin Jar is located at
file:/C:/Projekte/Maven/LokaleRepository/net/sourceforge/findbugs/coreplugin/1.3.2/coreplugin-1.3.2.jar
[INFO] Debugging is Off
[INFO] No bug include filter.
[INFO] ------------------------------------------------------------------------
[ERROR] FATAL ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Could not find resource 'findbugs-exclude.xml'.
[INFO] ------------------------------------------------------------------------
[INFO] Trace
org.codehaus.plexus.resource.loader.ResourceNotFoundException: Could not find
resource 'findbugs-exclude.xml'.
at
org.codehaus.plexus.resource.DefaultResourceManager.getResourceAsInputStream(DefaultResourceManager.java:91)
at
org.codehaus.plexus.resource.DefaultResourceManager.getResourceAsFile(DefaultResourceManager.java:117)
at
org.codehaus.plexus.resource.DefaultResourceManager.getResourceAsFile(DefaultResourceManager.java:100)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:86)
at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:230)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:912)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:756)
at
org.codehaus.groovy.runtime.InvokerHelper.invokePojoMethod(InvokerHelper.java:766)
at org.codehaus.groovy.runtime.InvokerHelper.invokeMethod(InvokerHelper.java:754)
at
org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodN(ScriptBytecodeAdapter.java:170)
at
org.codehaus.mojo.findbugs.FindBugsMojo.addFiltersToFindBugs(FindBugsMojo.groovy:499)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:86)
at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:230)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:912)
at
org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodOnCurrentN(ScriptBytecodeAdapter.java:78)
at
org.codehaus.mojo.findbugs.FindBugsMojo.initialiseFindBugs(FindBugsMojo.groovy:1016)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:86)
at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:230)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:912)
at
org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodOnCurrentN(ScriptBytecodeAdapter.java:78)
at org.codehaus.mojo.findbugs.FindBugsMojo.executeReport(FindBugsMojo.groovy:722)
at
org.apache.maven.reporting.AbstractMavenReport.generate(AbstractMavenReport.java:101)
at
org.apache.maven.reporting.AbstractMavenReport.execute(AbstractMavenReport.java:66)
at
org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:451)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:558)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:512)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:482)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:330)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:291)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:142)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:336)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:129)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:287)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 43 seconds
[INFO] Finished at: Wed Nov 12 09:35:01 CET 2008
[INFO] Final Memory: 19M/35M
[INFO] ------------------------------------------------------------------------
Zeichne Testergebnisse auf.
FATAL: input contained no data
java.io.EOFException: input contained no data
at org.xmlpull.mxp1.MXParser.fillBuf(MXParser.java:2890)
at org.xmlpull.mxp1.MXParser.more(MXParser.java:2928)
at org.xmlpull.mxp1.MXParser.parseProlog(MXParser.java:1366)
at org.xmlpull.mxp1.MXParser.nextImpl(MXParser.java:1351)
at org.xmlpull.mxp1.MXParser.next(MXParser.java:1061)
at
hudson.plugins.violations.parse.AbstractParser.expectNextTag(AbstractParser.java:262)
at
hudson.plugins.violations.types.findbugs.FindBugsParser.execute(FindBugsParser.java:41)
at
hudson.plugins.violations.parse.AbstractTypeParser.parse(AbstractTypeParser.java:59)
at
hudson.plugins.violations.ViolationsCollector.doType(ViolationsCollector.java:189)
at
hudson.plugins.violations.ViolationsCollector.invoke(ViolationsCollector.java:116)
at
hudson.plugins.violations.ViolationsCollector.invoke(ViolationsCollector.java:27)
at hudson.FilePath.act(FilePath.java:388)
at
hudson.plugins.violations.ViolationsPublisher.perform(ViolationsPublisher.java:77)
at
hudson.tasks.BuildStepCompatibilityLayer.perform(BuildStepCompatibilityLayer.java:33)
at
hudson.model.AbstractBuild$AbstractRunner.performAllBuildStep(AbstractBuild.java:319)
at
hudson.model.AbstractBuild$AbstractRunner.performAllBuildStep(AbstractBuild.java:307)
at hudson.model.Build$RunnerImpl.post2(Build.java:126)
at hudson.model.AbstractBuild$AbstractRunner.post(AbstractBuild.java:292)
at hudson.model.Run.run(Run.java:837)
at hudson.model.Build.run(Build.java:88)
at hudson.model.ResourceController.execute(ResourceController.java:70)
at hudson.model.Executor.run(Executor.java:88)
I suspect this issue to be also the cause for the findbugs plug-in failing on a
multi-module configuration as described here:
http://mojo.codehaus.org/findbugs-maven-plugin/examples/multi-module-config.html
I have set up a multi-module project with findbugs as described in the link
above. It works fine from the command line, using mvn:site, but fails on hudson.
My parent POM:
...
<extensions>
<extension>
<groupId>myconfig</groupId>
<artifactId>myconfig-findbugs</artifactId>
<version>1.0-SNAPSHOT</version>
</extension>
</extensions>
...
<reporting>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>findbugs-maven-plugin</artifactId>
<version>2.0-SNAPSHOT</version>
<configuration>
<xmlOutput>true</xmlOutput>
<findbugsXmlOutput>true</findbugsXmlOutput>
<excludeFilterFile>findbugs-exclude.xml</excludeFilterFile>
<effort>Min</effort>
</configuration>
</plugin>
</plugins>
</reporting>
...
Error in hudson while executing findbugs on a module:
[INFO] Preparing findbugs:findbugs
[INFO] [resources:resources]
[INFO] Using default encoding to copy filtered resources.
[INFO] [compiler:compile]
[INFO] Nothing to compile - all classes are up to date
[INFO] [findbugs:findbugs]
[INFO] Using source root:
[INFO] C:\Projekte\HudsonHome\jobs\Magellan-Basis -
Core\workspace\trunk\core-messaging\target\classes
[INFO] Using minimum effort.
[INFO] No threshold provided, using default threshold.
[INFO] Using FindBugs Version: 1.3.2
[INFO] No threshold provided, using default threshold.
[INFO] No threshold provided, using default threshold.
[INFO] No threshold provided, using default threshold.
[INFO] Using the xdoc format
[INFO] Using minimum effort.
[INFO] No threshold provided, using default threshold.
[INFO] No threshold provided, using default threshold.
[INFO] coreplugin Jar is located at
file:/C:/Projekte/Maven/LokaleRepository/net/sourceforge/findbugs/coreplugin/1.3.2/coreplugin-1.3.2.jar
[INFO] Debugging is Off
[INFO] No bug include filter.
[INFO] ------------------------------------------------------------------------
[ERROR] FATAL ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Could not find resource 'findbugs-exclude.xml'.
[INFO] ------------------------------------------------------------------------
[INFO] Trace
org.codehaus.plexus.resource.loader.ResourceNotFoundException: Could not find
resource 'findbugs-exclude.xml'.
at
org.codehaus.plexus.resource.DefaultResourceManager.getResourceAsInputStream(DefaultResourceManager.java:91)
at
org.codehaus.plexus.resource.DefaultResourceManager.getResourceAsFile(DefaultResourceManager.java:117)
at
org.codehaus.plexus.resource.DefaultResourceManager.getResourceAsFile(DefaultResourceManager.java:100)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:86)
at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:230)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:912)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:756)
at
org.codehaus.groovy.runtime.InvokerHelper.invokePojoMethod(InvokerHelper.java:766)
at org.codehaus.groovy.runtime.InvokerHelper.invokeMethod(InvokerHelper.java:754)
at
org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodN(ScriptBytecodeAdapter.java:170)
at
org.codehaus.mojo.findbugs.FindBugsMojo.addFiltersToFindBugs(FindBugsMojo.groovy:499)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:86)
at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:230)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:912)
at
org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodOnCurrentN(ScriptBytecodeAdapter.java:78)
at
org.codehaus.mojo.findbugs.FindBugsMojo.initialiseFindBugs(FindBugsMojo.groovy:1016)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:86)
at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:230)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:912)
at
org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodOnCurrentN(ScriptBytecodeAdapter.java:78)
at org.codehaus.mojo.findbugs.FindBugsMojo.executeReport(FindBugsMojo.groovy:722)
at
org.apache.maven.reporting.AbstractMavenReport.generate(AbstractMavenReport.java:101)
at
org.apache.maven.reporting.AbstractMavenReport.execute(AbstractMavenReport.java:66)
at
org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:451)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:558)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:512)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:482)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:330)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:291)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:142)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:336)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:129)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:287)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 43 seconds
[INFO] Finished at: Wed Nov 12 09:35:01 CET 2008
[INFO] Final Memory: 19M/35M
[INFO] ------------------------------------------------------------------------
Zeichne Testergebnisse auf.
FATAL: input contained no data
java.io.EOFException: input contained no data
at org.xmlpull.mxp1.MXParser.fillBuf(MXParser.java:2890)
at org.xmlpull.mxp1.MXParser.more(MXParser.java:2928)
at org.xmlpull.mxp1.MXParser.parseProlog(MXParser.java:1366)
at org.xmlpull.mxp1.MXParser.nextImpl(MXParser.java:1351)
at org.xmlpull.mxp1.MXParser.next(MXParser.java:1061)
at
hudson.plugins.violations.parse.AbstractParser.expectNextTag(AbstractParser.java:262)
at
hudson.plugins.violations.types.findbugs.FindBugsParser.execute(FindBugsParser.java:41)
at
hudson.plugins.violations.parse.AbstractTypeParser.parse(AbstractTypeParser.java:59)
at
hudson.plugins.violations.ViolationsCollector.doType(ViolationsCollector.java:189)
at
hudson.plugins.violations.ViolationsCollector.invoke(ViolationsCollector.java:116)
at
hudson.plugins.violations.ViolationsCollector.invoke(ViolationsCollector.java:27)
at hudson.FilePath.act(FilePath.java:388)
at
hudson.plugins.violations.ViolationsPublisher.perform(ViolationsPublisher.java:77)
at
hudson.tasks.BuildStepCompatibilityLayer.perform(BuildStepCompatibilityLayer.java:33)
at
hudson.model.AbstractBuild$AbstractRunner.performAllBuildStep(AbstractBuild.java:319)
at
hudson.model.AbstractBuild$AbstractRunner.performAllBuildStep(AbstractBuild.java:307)
at hudson.model.Build$RunnerImpl.post2(Build.java:126)
at hudson.model.AbstractBuild$AbstractRunner.post(AbstractBuild.java:292)
at hudson.model.Run.run(Run.java:837)
at hudson.model.Build.run(Build.java:88)
at hudson.model.ResourceController.execute(ResourceController.java:70)
at hudson.model.Executor.run(Executor.java:88)