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

Only first execution is tracked

    XMLWordPrintable

Details

    • 5.0.0-beta2

    Description

      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.

      Attachments

        Issue Links

          Activity

            cschulz C. S. created issue -
            drulli Ulli Hafner added a comment -

            Are you using a maven job? Here the first findbugs goal is picked up.

            Workaround: use the freestyle project.

            drulli Ulli Hafner added a comment - Are you using a maven job? Here the first findbugs goal is picked up. Workaround: use the freestyle project.
            cschulz C. S. added a comment -

            Yes I am using a maven job and we need the possibilities of it.

            Is there no way to fetch more than one goal or just take the result of a findbugs goal instead of check?

            cschulz C. S. added a comment - Yes I am using a maven job and we need the possibilities of it. Is there no way to fetch more than one goal or just take the result of a findbugs goal instead of check?
            drulli Ulli Hafner added a comment - - edited

            No, currently it runs for the first goal that has the text findbugs in it. Maybe you can change your check configuration to something like in JENKINS-29414?

            drulli Ulli Hafner added a comment - - edited No, currently it runs for the first goal that has the text findbugs in it. Maybe you can change your check configuration to something like in JENKINS-29414 ?
            cschulz C. S. added a comment - - edited

            I don't see the difference, but my plan as workaround will be to change the execution order of the jenkins profile. It should execute the findbugs goal at first and after it the check goal.

            cschulz C. S. added a comment - - edited I don't see the difference, but my plan as workaround will be to change the execution order of the jenkins profile. It should execute the findbugs goal at first and after it the check goal.
            cschulz 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?

            cschulz 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?
            drulli 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?

            drulli 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?
            cschulz 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....
            
            cschulz 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....
            drulli 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.

            drulli 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.
            cschulz 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?

            cschulz 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?
            drulli 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.

            drulli 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.
            cschulz 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.

            cschulz 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.
            drulli 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...

            drulli 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...
            drulli Ulli Hafner made changes -
            Field Original Value New Value
            Labels maven-support
            drulli Ulli Hafner made changes -
            Description I 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.
            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.
            drulli Ulli Hafner made changes -
            Labels maven-support maven-plugin-support
            rtyler R. Tyler Croy made changes -
            Workflow JNJira [ 167067 ] JNJira + In-Review [ 182568 ]
            drulli Ulli Hafner made changes -
            Labels maven-plugin-support analysis-core-2.0
            drulli Ulli Hafner made changes -
            Remote Link This issue links to "Page (Jenkins Wiki)" [ 17277 ]
            drulli 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?

            drulli 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?
            drulli Ulli Hafner made changes -
            Status Open [ 1 ] In Progress [ 3 ]
            drulli Ulli Hafner made changes -
            Epic Link JENKINS-49911 [ 188901 ]
            drulli Ulli Hafner made changes -
            Resolution Fixed [ 1 ]
            Status In Progress [ 3 ] Resolved [ 5 ]
            drulli Ulli Hafner made changes -
            Status Resolved [ 5 ] Fixed but Unreleased [ 10203 ]
            drulli Ulli Hafner added a comment -

            Released in 5.0.0-beta2.

            drulli Ulli Hafner added a comment - Released in 5.0.0-beta2.
            drulli Ulli Hafner made changes -
            Released As 5.0.0-beta2
            Status Fixed but Unreleased [ 10203 ] Resolved [ 5 ]

            People

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

              Dates

                Created:
                Updated:
                Resolved: