findbugs class路径如何实现模糊匹配

大家好,
目前我有这么一个问题,在maven主项目下面有很多子项目,子项目分别为biz,web,timer。biz下面有target/classes,还有target/biz-1.0.0-SNAPSHOT/lib/*.jar。
目前我用ant配置findbugs的时候,class如果指定maven主项目的目录,会考虑lib下面的jar包。我想过滤lib下面的jar包不检查,可以写多个class,比如这样:

 <class location="..../biz/target/classes"/>
<class location="..../web/target/classes"/>
<class location="..../timer/target/classes"/>

这样写的话,每一个maven项目都需要进行这个xml文件的定制。但是location又不支持路径的通配符,比如这样的形式:

 <class location="..../**/target/classes"/>

请问大家有谁知道能够实现写一个通用的xml文件来实现所有的我这种maven项目的findbugs检查。

的确不支持,你可以写一个脚本去自动维护这个xml,用java或者什么语言遍历目录,产生这些路径。

利用shell脚本修改xml文件class标签

 #原有findbugs检查class路径
   export class_dir="<class location=\"\${jenkins.classpath}\"/>"
   #新class路径
   export class_dir_new=`find ./ -name "*classes*"|grep "target/classes"|paste -sd\ `
   class_dir_new=${class_dir_new//./<class location=\"\${jenkins.classpath\}}
   class_dir_new=${class_dir_new//classes/classes\"\/>}
   #替换
   sed -i 's%'"${class_dir}"'%'"${class_dir_new}"'%' findbugs_pub.xml