• 5.0.0-beta2

      jI have different findbugs goals in my pom file configured.

      One is executed as check to break the build instantly if some rules are violated.
      The second one is the normal findbugs goal.

      I have noticed that only the first one is tracked.

          [JENKINS-31633] Only first execution is tracked

          C. S. added a comment -

          It seems not as easy as thought to change the order of the excection caused by the check goal design.

          The check goal calls internally the findbugs/pmd report goal and detects if there is already a report file and takes it instead of reanalysis.

          Is there any possibility to skip check goals in your plugin?

          C. S. added a comment - It seems not as easy as thought to change the order of the excection caused by the check goal design. The check goal calls internally the findbugs/pmd report goal and detects if there is already a report file and takes it instead of reanalysis. Is there any possibility to skip check goals in your plugin?

          Ulli Hafner added a comment -

          From the source code I see that only the goal findbugs or site should match:
          https://github.com/jenkinsci/findbugs-plugin/blob/master/plugin/src/main/java/hudson/plugins/findbugs/FindBugsReporter.java#L199

          What exactly are your maven goals?

          Ulli Hafner added a comment - From the source code I see that only the goal findbugs or site should match: https://github.com/jenkinsci/findbugs-plugin/blob/master/plugin/src/main/java/hudson/plugins/findbugs/FindBugsReporter.java#L199 What exactly are your maven goals?

          C. S. added a comment -

          Yes you are right it should cover my goals. But the second time it isn't executed.

          Here the jenkins output:

          [INFO] --- findbugs-maven-plugin:3.0.3:findbugs (findbugs) @ business ---
          [INFO] Fork Value is true
          [INFO] Done FindBugs Analysis....
          [FINDBUGS] Finding all files that match the pattern findbugsXml.xml
          [FINDBUGS] Parsing 1 file in TRUNK/business/target
          [FINDBUGS] Successfully parsed file TRUNK/business/target/findbugsXml.xml of module Heatsoak Business with 0 unique warnings and 0 duplicates.
          [FINDBUGS] Computing warning deltas based on reference build #1029
          [INFO] 
          [INFO] <<< findbugs-maven-plugin:3.0.3:check (findbugs-always) < :findbugs @ business <<<
          [INFO] 
          [INFO] --- findbugs-maven-plugin:3.0.3:check (findbugs-always) @ business ---
          [INFO] BugInstance size is 0
          [INFO] Error size is 0
          [INFO] No errors/warnings found
          ...
          [INFO] --- findbugs-maven-plugin:3.0.3:findbugs (findbugs-normal) @ business ---
          [INFO] Fork Value is true
               [java] Warnings generated: 47
          [INFO] Done FindBugs Analysis....
          

          C. S. added a comment - Yes you are right it should cover my goals. But the second time it isn't executed. Here the jenkins output: [INFO] --- findbugs-maven-plugin:3.0.3:findbugs (findbugs) @ business --- [INFO] Fork Value is true [INFO] Done FindBugs Analysis.... [FINDBUGS] Finding all files that match the pattern findbugsXml.xml [FINDBUGS] Parsing 1 file in TRUNK/business/target [FINDBUGS] Successfully parsed file TRUNK/business/target/findbugsXml.xml of module Heatsoak Business with 0 unique warnings and 0 duplicates. [FINDBUGS] Computing warning deltas based on reference build #1029 [INFO] [INFO] <<< findbugs-maven-plugin:3.0.3:check (findbugs-always) < :findbugs @ business <<< [INFO] [INFO] --- findbugs-maven-plugin:3.0.3:check (findbugs-always) @ business --- [INFO] BugInstance size is 0 [INFO] Error size is 0 [INFO] No errors/warnings found ... [INFO] --- findbugs-maven-plugin:3.0.3:findbugs (findbugs-normal) @ business --- [INFO] Fork Value is true [java] Warnings generated: 47 [INFO] Done FindBugs Analysis....

          Ulli Hafner added a comment -

          Ah, but the first goal is also called 'findbugs'! I thought the first goal is called 'check'? Seems that your check goal already starts the 'findbugs' goal internally! Then it will not work: the plug-in always uses the result of the first invokation of the 'findbugs' goal.

          Ulli Hafner added a comment - Ah, but the first goal is also called 'findbugs'! I thought the first goal is called 'check'? Seems that your check goal already starts the 'findbugs' goal internally! Then it will not work: the plug-in always uses the result of the first invokation of the 'findbugs' goal.

          C. S. added a comment -

          I have copied too less output. Before the first findbugs there is the check goal. And yes internally findbugs is called by check.

          Is there no way to instruct the plugin to use more than one file for the result?

          C. S. added a comment - I have copied too less output. Before the first findbugs there is the check goal. And yes internally findbugs is called by check. Is there no way to instruct the plugin to use more than one file for the result?

          Ulli Hafner added a comment -

          No this is not possible with the maven findbugs reporter.

          I need to get rid of this project type, there are so many issues with this type. Maybe it is possible to enable both variants for maven jobs.

          Ulli Hafner added a comment - No this is not possible with the maven findbugs reporter. I need to get rid of this project type, there are so many issues with this type. Maybe it is possible to enable both variants for maven jobs.

          C. S. added a comment -

          Alright in this case I have solved it like here JENKINS-28746 .

          I have changed the phases of the different exceutions to be sure that the non breaker execution is executed at first.

          What would be the advantage to support only freetype? There are some plugins which are limited to maven projects, which can't be used together without creating an own analysis job in jenkins.

          C. S. added a comment - Alright in this case I have solved it like here JENKINS-28746 . I have changed the phases of the different exceutions to be sure that the non breaker execution is executed at first. What would be the advantage to support only freetype? There are some plugins which are limited to maven projects, which can't be used together without creating an own analysis job in jenkins.

          Ulli Hafner added a comment -

          I don't want to remove maven support. I just want to remove the special handling of maven projects. Currently I have two classes, one for maven, one for freestyle. In the future I would merge these classes (or delete the maven class).

          This is how the warnings plug-in works: just one class for both project types. From the user perspective there is almost no difference.

          Disadvantages:
          1) I can't (yet) read information from the pom. So you need to specify the filename pattern manually in the configuration section.
          2) The findbugs plug-in shows up in the post build actions...

          Ulli Hafner added a comment - I don't want to remove maven support. I just want to remove the special handling of maven projects. Currently I have two classes, one for maven, one for freestyle. In the future I would merge these classes (or delete the maven class). This is how the warnings plug-in works: just one class for both project types. From the user perspective there is almost no difference. Disadvantages: 1) I can't (yet) read information from the pom. So you need to specify the filename pattern manually in the configuration section. 2) The findbugs plug-in shows up in the post build actions...

          Ulli Hafner added a comment -

          I'm trying to consolidate the requirements for the static analysis suite in pipeline jobs in a wiki page. Can you please read it carefully and comment or change it accordingly?

          Ulli Hafner added a comment - I'm trying to consolidate the requirements for the static analysis suite in pipeline jobs in a wiki page . Can you please read it carefully and comment or change it accordingly?

          Ulli Hafner added a comment -

          Released in 5.0.0-beta2.

          Ulli Hafner added a comment - Released in 5.0.0-beta2.

            drulli Ulli Hafner
            cschulz C. S.
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: