maven中Findbugs分析的极限类
如何限制仅针对某些包分析的类。 在一个模块中,我不希望为某些包运行FindBugsforMaven。我怎样才能排除他们。是否有任何方法可以指定Maven Findbugs要消除的包装请参考- 使用maven中Findbugs分析的极限类,maven,findbugs,Maven,Findbugs,如何限制仅针对某些包分析的类。 在一个模块中,我不希望为某些包运行FindBugsforMaven。我怎样才能排除他们。是否有任何方法可以指定Maven Findbugs要消除的包装请参考- 使用mvn站点而不是mvn findbugs:findbugs 您需要在配置标记下使用include exclude过滤器文件或onlyanaze <reporting> <plugins> <plugin> <groupId>org.codeha
mvn站点
而不是mvn findbugs:findbugs
您需要在配置标记下使用include exclude过滤器文件或onlyanaze
<reporting>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>findbugs-maven-plugin</artifactId>
<version>2.5.2</version>
<configuration>
<excludeFilterFile>src/main/resources/findbugs-exclude.xml</excludeFilterFile>
<includeFilterFile>src/main/resources/findbugs-include.xml</includeFilterFile>
<onlyAnalyze>com.packagename.*</onlyAnalyze>
</configuration>
</plugin>
</plugins>
org.codehaus.mojo
findbugs maven插件
2.5.2
src/main/resources/findbugs-exclude.xml
src/main/resources/findbugs-include.xml
com.packagename*
示例过滤器文件
<FindBugsFilter>
<Match>
<Package name="~com\.ly\..*"/>
</Match>
我编写了exclude.xml文件,但它仍然没有跳过对这些包的分析。我的当前目录:A文件夹层次结构:A/src/main/com/ly/om/sn Excelude.xml文件
code
这里有什么不正确的地方?当我运行“mvn站点”时,我们如何检查我们的筛选文件是否被选中。因为我在报告中没有看到排除过滤器文件中提到的包已被排除。我通过添加和删除一个具有已知findbugs错误的包进行了验证。好的。那就意味着我的过滤文件没有被提取。因为我看到在排除文件中指定了从包引发的错误:|我们在src/main/resources中签入了过滤器文件,并在中引用它。另外,你也可以试着玩false。注: