How to generate a html report for findbugs with Maven 3.x

后端 未结 2 720
南方客
南方客 2020-12-05 11:28

Has anybody managed to configure the findbugs Maven 3.x plugin to produce both an xml and html report? (I want the xml one for Jenkins and the html one for checking prior to

相关标签:
2条回答
  • The Findbugs-Plugin should be in the reportPlugins-Part of the maven-site-plugin.

    <build>
      <plugins>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-site-plugin</artifactId>
          <configuration>
            <reportPlugins>
              <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>findbugs-maven-plugin</artifactId>
              </plugin>
            </reportPlugins>
          </configuration>
        </plugin>
      </plugins>
    </build>
    

    And additionally, findbugs-report is only generated when the source is compiled before running mvn site. When generate the site, i use mvn test site so findbugs generate the report.

    0 讨论(0)
  • 2020-12-05 12:14

    Check my answer for similar question where I suggest to use XSLT transformations shipped with Findbugs to generate HTML report during an execution of mvn clean install command.

    0 讨论(0)
提交回复
热议问题