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

Findbugs- and Checkstyle-Plugins do not show any results in Maven style job.

    Details

    • Similar Issues:

      Description

      The Findbugs- and Checkstyle-Plugins for Jenkins do not show any results in a maven style job. If the project is configured as freestyle job both plugins show results.

      In both jobs the file are properly generated.
      See attachments for directory structures, console outputs and the main view.

      Configuration of both plugins in maven:

      <reporting> 
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-checkstyle-plugin</artifactId>
            <version>2.10</version>
          </plugin>
          <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>findbugs-maven-plugin</artifactId>
            <version>2.5.2</version>
            <configuration>
              <failOnError>false</failOnError>
              <xmlOutput>true</xmlOutput>
            </configuration>
          </plugin>
        </plugins>
      </reporting>
      

      This bug is similar to JENKINS-12853.

        Attachments

        1. config_as_freestyle.jpg
          config_as_freestyle.jpg
          121 kB
        2. config_as_freestyle.xml
          6 kB
        3. config_as_maven.jpg
          config_as_maven.jpg
          74 kB
        4. config_as_maven.xml
          6 kB
        5. Console_Output_Freestyle_Job.jpg
          Console_Output_Freestyle_Job.jpg
          548 kB
        6. Console_Output_Maven_Job.jpg
          Console_Output_Maven_Job.jpg
          129 kB
        7. Main_Window_with_both_jobs.jpg
          Main_Window_with_both_jobs.jpg
          97 kB
        8. Project_as_Freestyle_Job.jpg
          Project_as_Freestyle_Job.jpg
          80 kB
        9. Project_as_Maven_Job.jpg
          Project_as_Maven_Job.jpg
          74 kB

          Activity

          Hide
          drulli Ulli Hafner added a comment -

          Is there no FINDBUGS logging statement in between the maven log?

          Which maven goals did you call?

          Show
          drulli Ulli Hafner added a comment - Is there no FINDBUGS logging statement in between the maven log? Which maven goals did you call?
          Hide
          browser Robert Danczak added a comment -

          In the maven style job there is no [FINDBUGS] or [CHECKSTYLE] logging. The only output I get with findbugs or checkstyle is from the maven plugin itself.
          It looks like this:

          [INFO] --- maven-checkstyle-plugin:2.10:checkstyle (default-cli) @ ... ---
          [INFO] 
          [INFO] There are 49 checkstyle errors.
          [INFO] --- findbugs-maven-plugin:2.5.2:findbugs (default-cli) @ ... ---
          [INFO] Fork Value is true
               [java] Warnings generated: 1
          [INFO] Done FindBugs Analysis....
          

          In both jobs I call first mvn clean install and afterwards mvn checkstyle:checkstyle findbugs:findbugs.

          If you need a deeper look at this problem I can provide both config.xml or the complete jenkins.

          Show
          browser Robert Danczak added a comment - In the maven style job there is no [FINDBUGS] or [CHECKSTYLE] logging. The only output I get with findbugs or checkstyle is from the maven plugin itself. It looks like this: [INFO] --- maven-checkstyle-plugin:2.10:checkstyle ( default -cli) @ ... --- [INFO] [INFO] There are 49 checkstyle errors. [INFO] --- findbugs-maven-plugin:2.5.2:findbugs ( default -cli) @ ... --- [INFO] Fork Value is true [java] Warnings generated: 1 [INFO] Done FindBugs Analysis.... In both jobs I call first mvn clean install and afterwards mvn checkstyle:checkstyle findbugs:findbugs. If you need a deeper look at this problem I can provide both config.xml or the complete jenkins.
          Hide
          drulli Ulli Hafner added a comment -

          What do you mean with first "mvn clean install" and afterwards "mvn checkstyle:checkstyle".

          In maven jobs you only have the option to specify the goals in the text field, you do not start maven with "mvn".

          Can you please post a screenshot of your maven configuration in the Jenkins job? Or the config.xml...

          Show
          drulli Ulli Hafner added a comment - What do you mean with first "mvn clean install" and afterwards "mvn checkstyle:checkstyle". In maven jobs you only have the option to specify the goals in the text field, you do not start maven with "mvn". Can you please post a screenshot of your maven configuration in the Jenkins job? Or the config.xml...
          Hide
          browser Robert Danczak added a comment - - edited

          config files and screenshots have been attached.

          EDIT:
          The hook on "Veröffentliche die Ergebnisse der Checkstyle Analyse" was turned on after the config has been uploaded but the output remains the same.

          Show
          browser Robert Danczak added a comment - - edited config files and screenshots have been attached. EDIT: The hook on "Veröffentliche die Ergebnisse der Checkstyle Analyse" was turned on after the config has been uploaded but the output remains the same.
          Hide
          drulli Ulli Hafner added a comment -

          Das kann natürlich nicht funktionieren. Maven Post Steps werden nach meinem Plug-in aufgerufen (Post .

          Lösung: Post steps entfernen und in Maven Goals hinzufügen:
          clean install checkstyle:checkstyle findbugs:findbugs

          Show
          drulli Ulli Hafner added a comment - Das kann natürlich nicht funktionieren. Maven Post Steps werden nach meinem Plug-in aufgerufen (Post . Lösung: Post steps entfernen und in Maven Goals hinzufügen: clean install checkstyle:checkstyle findbugs:findbugs
          Hide
          browser Robert Danczak added a comment -

          Danke für den Tipp.
          Darauf hätte ich ja kommen können. Ein Test dazu hätte genügt. Man, man, man.

          Show
          browser Robert Danczak added a comment - Danke für den Tipp. Darauf hätte ich ja kommen können. Ein Test dazu hätte genügt. Man, man, man.

            People

            • Assignee:
              drulli Ulli Hafner
              Reporter:
              browser Robert Danczak
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: