I’m hoping this is a simple enough question.
I have FindBugs working in Eclipse. I also have it working in Maven.
However, if I see a bug that is either a false positive, or too mild, or quite simply isn’t going to be fixed, then I will ignore it in Eclipse. This then leads to a problem where Maven still reports the bug. This is not ideal. Technically speaking I could probably edit the Maven config to ignore certain bugs, but that seems inefficient. Also, there will be a team of people working on this project so I will need to eventually find a solution where the bug settings are stored in SVN, or on a network drive.
But anyway, I think I have found the folder where the eclipse settings related to these bugs are stored:
<ECLIPSE_WORKSPACE>/.metadata/.plugins/edu.umd.cs.findbugs.plugin.eclipse
Is it possible to point Maven at this same file during a build?
Or actually, is it possible to extract this to a separate location, eg on the network, and then point both eclipse and maven at it?
Any help appreciated.
Thanks.
You can add a exclude filter file to you maven configuration:
The configuration file looks like this. The following will match
SE_BAD_FIELDwarning from findbugs from all classes insidemy.package. See more here.You can then add the same filter file to Eclipse FindBugs plugin from Window -> Preferences -> Java -> FindBugs -> Filter Files -> Exclude filter files -> Add..