在maven项目中使用findbugs

1.在pom.xml中添加插件依赖

<plugin>  
                <groupId>org.codehaus.mojo</groupId>  
                <artifactId>findbugs-maven-plugin</artifactId>  
                <version>2.5.2</version>  
                <configuration>  
                    <xmlOutput>true</xmlOutput>  
                    <effort>Max</effort>
                    <findbugsXmlOutputDirectory>target/site</findbugsXmlOutputDirectory>
                </configuration>  
            </plugin>  
			

 2.执行clean命令清理项目

3.执行package命令打包

4.执行 findbugs:findbugs 



 

5.执行 findbugs:gui 查看bug

猜你喜欢

转载自wuyechun.iteye.com/blog/1941942