Skip to content

Commit

Permalink
[docs] Per #113, add how to use analysis properties with maven plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
hazendaz committed Nov 7, 2023
1 parent 5dd597e commit 7fc8cb2
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,3 +85,21 @@ If using groovy with same group id (```org.codehaus.groovy 3.x``` or before or `
## Eclipse m2e Integration ##

The plugin cycles controlled by Eclipse require compilation phase for m2e without further help. This plugin runs verify and during site generation. Therefore Eclipse m2e will show up but not do anything with this plugin alone. In order to have proper execution within Ecipse m2e, use [m2e-code-quality](https://github.com/m2e-code-quality/m2e-code-quality) plugin for spotbugs.

## Analysis Properties ##

Is there some way to set the [Analysis Properties](https://spotbugs.readthedocs.io/en/stable/analysisprops.html) when using the maven plugin?

Analysis properties are passed as Java system properties, so they can be set in the <jvmArgs> configuration element.

E.g. to set the findbugs.assertionmethods analyzer property:

```
<plugin>
<groupId>com.github.spotbugs</groupId>
<artifactId>spotbugs-maven-plugin</artifactId>
<configuration>
<jvmArgs>-Dfindbugs.assertionmethods=org.apache.commons.lang3.Validate.notNull</jvmArgs>
</configuration?
</plugin>
```

0 comments on commit 7fc8cb2

Please sign in to comment.