Recently I downloaded the findsecbugs-plugin-1.11.0.jar in order to use it in spotbugs. I copied this jar file to the folder plugin of the project spotbugs(4.1.4).
I execute spotbugs making use of ant. When I run the ant target I get the following message:
[spotbugs] Executing SpotBugs FindBugsTask from ant task
[spotbugs] Running SpotBugs...
[spotbugs] The following classes needed for analysis were missing:
[spotbugs] apply
[spotbugs] applyAsInt
[spotbugs] test
[spotbugs] accept
[spotbugs] Java Result: 3
[spotbugs] Classes needed for analysis were missing
Do you know what extra jar files do I need?
Unfortunately, the Ant integration does not have plugins configuration.
Option 1 : Exec Task
You could run the command-line version of Find-Security-Bugs. You have to invoke the tool with
exectask. With this, you will be able to generate XML, HTML and SARIF reports.Option 2 : Java task
As an alternative, you can use the Java task to invoke the class
edu.umd.cs.findbugs.FindBugs2which handles the CLI interface of SpotBugs.You can take inspiration from the Maven implementation which use under the hood the AntRunner.
I'm not 100% sure that you can define pluginArtifacts from an Ant script. You might have to create a small plugin to do it.