簡體   English   中英

通過Maven Eclipse運行findbugs

[英]run findbugs through maven eclipse

如何通過Maven項目通過Eclipse運行findbugs。 我已經在Maven中配置為:

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
  <modelVersion>4.0.0</modelVersion>

  <groupId>com.home.app</groupId>
  <artifactId>home-app</artifactId>
  <version>0.0.1</version>
  <packaging>jar</packaging>

  <name>home-app</name>
  <url>http://maven.apache.org</url>

  <properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
  </properties>

  <build>
    <plugins>       
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>findbugs-maven-plugin</artifactId>
        <version>2.3.2</version>
        <configuration>
          <effort>Max</effort>
          <threshold>Low</threshold>
          <xmlOutput>true</xmlOutput>
        </configuration>
        <executions>
          <execution>
            <phase>verify</phase> 
            <goals>
              <goal>check</goal> 
            </goals>
          </execution>
        </executions>
      </plugin>         
    </plugins>
  </build>
  <dependencies>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>3.8.1</version>
      <scope>test</scope>
    </dependency>
  </dependencies>
</project>

我想知道findbugs報告的錯誤/警告是什么。

您將在目標目錄中創建的常規編譯程序包階段找到該報告。 如果您希望看到更具可讀性的輸出,則必須在報告塊而不是構建塊中使用findbugs目標。

您也可以只使用findbugs eclipse插件,這將為您提供一個漂亮的eclipse窗口,可直接將您指向所有bug。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM