Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-2714

FindBugs plug-in should automatically set correct pom.xml properties

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Component/s: findbugs-plugin
    • Labels:
      None
    • Environment:
      Platform: All, OS: All
    • Similar Issues:

      Description

      FindBugs is reporting that it can not copy a file from a slave to a master - but
      there is no slave - it is a totally local (and self contained) install.

      -Chris

      [FINDBUGS] Can't copy file from slave to master:
      slave=workspace/src/main/java/com/ibm/issw/cei/MessageDataStore.java,
      master=9dcc761c.tmp

      java.io.FileNotFoundException:
      workspace/src/main/java/com/ibm/issw/cei/MessageDataStore.java (No such file or
      directory)

      at java.io.FileInputStream.open(Native Method)

      at java.io.FileInputStream.<init>(FileInputStream.java:135)

      at hudson.FilePath$22.invoke(FilePath.java:823)

      at hudson.FilePath$22.invoke(FilePath.java:821)

      at hudson.FilePath.act(FilePath.java:389)

      at hudson.FilePath.copyTo(FilePath.java:821)

      at hudson.FilePath.copyTo(FilePath.java:809)

      at
      hudson.plugins.findbugs.util.HealthAwareMavenReporter.copyFilesToMaster(HealthAwareMavenReporter.java:235)

      at
      hudson.plugins.findbugs.util.HealthAwareMavenReporter.postExecute(HealthAwareMavenReporter.java:192)

      at
      hudson.maven.MavenModuleSetBuild$Builder.postExecute(MavenModuleSetBuild.java:603)

      at hudson.maven.MavenBuilder$Adapter.postExecute(MavenBuilder.java:267)

      at
      hudson.maven.agent.PluginManagerInterceptor$1MojoIntercepterImpl.callPost(PluginManagerInterceptor.java:147)

      at
      hudson.maven.agent.PluginManagerInterceptor.executeMojo(PluginManagerInterceptor.java:160)

      at
      org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:558)

      at
      org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:499)

      at
      org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:478)

      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.lifecycle.LifecycleExecutorInterceptor.execute(LifecycleExecutorInterceptor.java:42)

      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:79)

      at
      sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

      at java.lang.reflect.Method.invoke(Method.java:618)

      at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)

      at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)

      at hudson.maven.agent.Main.launch(Main.java:134)

      at hudson.maven.MavenBuilder.call(MavenBuilder.java:139)

      at hudson.maven.MavenModuleSetBuild$Builder.call(MavenModuleSetBuild.java:542)

      at hudson.maven.MavenModuleSetBuild$Builder.call(MavenModuleSetBuild.java:488)

      at hudson.remoting.UserRequest.perform(UserRequest.java:69)

      at hudson.remoting.UserRequest.perform(UserRequest.java:23)

      at hudson.remoting.Request$2.run(Request.java:213)

      at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:432)

      at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:284)

      at java.util.concurrent.FutureTask.run(FutureTask.java:138)

      at
      java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:665)

      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:690)

      at java.lang.Thread.run(Thread.java:810)

        Attachments

        1. findbugs.hpi
          3.77 MB
        2. findbugsXml.xml
          136 kB
        3. log
          50 kB

          Activity

          Hide
          jchristi jchristi added a comment -

          add cc

          Show
          jchristi jchristi added a comment - add cc
          Hide
          drulli Ulli Hafner added a comment -

          Seems that the plug-in does not use the correct XML file. Could you please
          verify if your pom contains the following snipped?
          Important are the properties

          <findbugsXmlOutput>true</findbugsXmlOutput>
          <findbugsXmlWithMessages>true</findbugsXmlWithMessages>

          The snippet:

          <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>findbugs-maven-plugin</artifactId>
          <version>1.2</version>
          <configuration>
          <findbugsXmlOutput>true</findbugsXmlOutput>
          <findbugsXmlWithMessages>true</findbugsXmlWithMessages>
          <xmlOutput>true</xmlOutput>
          [...]
          </configuration>
          </plugin>

          Show
          drulli Ulli Hafner added a comment - Seems that the plug-in does not use the correct XML file. Could you please verify if your pom contains the following snipped? Important are the properties <findbugsXmlOutput>true</findbugsXmlOutput> <findbugsXmlWithMessages>true</findbugsXmlWithMessages> The snippet: <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>findbugs-maven-plugin</artifactId> <version>1.2</version> <configuration> <findbugsXmlOutput>true</findbugsXmlOutput> <findbugsXmlWithMessages>true</findbugsXmlWithMessages> <xmlOutput>true</xmlOutput> [...] </configuration> </plugin>
          Hide
          tassoc tassoc added a comment -

          You are right, now it works.
          Thanks a lot.

          Show
          tassoc tassoc added a comment - You are right, now it works. Thanks a lot.
          Hide
          drulli Ulli Hafner added a comment -

          I hope that the following proposal will solve the problem.

          On Thu, Sep 18, 2008 at 5:13 PM, Hafner Ullrich wrote:
          > Hi Erik,
          >
          > I'm not sure about that. Is the pom that I get in my plugin reporter
          > writable? I.e. I need to plug-in before the compile job starts so that
          > all following mojos (and the maven compile process) use this pom.

          I dont think you need to alter the pom, the plugin could set the
          property in the same way the surefire reporter does
          (http://fisheye4.atlassian.com/browse/hudson/branches/btosabre/hudson/main/core/src/main/java/hudson/maven/reporters/SurefireArchiver.java?r=10802#l40)

          >
          > And what about users that are just interested in other warnings of the
          > maven process? They then automatically get the deprecated warnings too.

          Yes, and I think that would be a plus. Why would anyone ignore
          deprecated warnings? (if they really want to ignore them there are
          special annotations for it).

          > However, I should report at least a warning message that the plugin is
          > activated but no warning output is created. Currently these options are
          > only shown in the plug-in help, so a user might miss easily (in your
          > case

          Ehh, manuals? Schmanuals! I was just hoping the warnings plugin could
          do a little of the maven automatic configuration magic that it is
          doing with the tests and artifacts.

          //Erik

          Show
          drulli Ulli Hafner added a comment - I hope that the following proposal will solve the problem. On Thu, Sep 18, 2008 at 5:13 PM, Hafner Ullrich wrote: > Hi Erik, > > I'm not sure about that. Is the pom that I get in my plugin reporter > writable? I.e. I need to plug-in before the compile job starts so that > all following mojos (and the maven compile process) use this pom. I dont think you need to alter the pom, the plugin could set the property in the same way the surefire reporter does ( http://fisheye4.atlassian.com/browse/hudson/branches/btosabre/hudson/main/core/src/main/java/hudson/maven/reporters/SurefireArchiver.java?r=10802#l40 ) > > And what about users that are just interested in other warnings of the > maven process? They then automatically get the deprecated warnings too. Yes, and I think that would be a plus. Why would anyone ignore deprecated warnings? (if they really want to ignore them there are special annotations for it). > However, I should report at least a warning message that the plugin is > activated but no warning output is created. Currently these options are > only shown in the plug-in help, so a user might miss easily (in your > case Ehh, manuals? Schmanuals! I was just hoping the warnings plugin could do a little of the maven automatic configuration magic that it is doing with the tests and artifacts. //Erik
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in hudson
          User: : drulli
          Path:
          trunk/hudson/plugins/findbugs/src/main/java/hudson/plugins/findbugs/FindBugsReporter.java
          http://fisheye4.cenqua.com/changelog/hudson/?cs=14523
          Log:
          [FIXED JENKINS-2714] Automatically set required maven options.

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in hudson User: : drulli Path: trunk/hudson/plugins/findbugs/src/main/java/hudson/plugins/findbugs/FindBugsReporter.java http://fisheye4.cenqua.com/changelog/hudson/?cs=14523 Log: [FIXED JENKINS-2714] Automatically set required maven options.

            People

            Assignee:
            drulli Ulli Hafner
            Reporter:
            chrisgwarp Chris Graham
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: