Skip to content

Commit b1b830c

Browse files
committed
Switch to spotbugs
1 parent e654d4a commit b1b830c

1 file changed

Lines changed: 20 additions & 11 deletions

File tree

pom.xml

Lines changed: 20 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,9 @@
2929

3030
<properties>
3131
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
32-
<findbugs-maven-plugin.version>3.0.5</findbugs-maven-plugin.version>
33-
<findbugs-maven-plugin.failOnError>true</findbugs-maven-plugin.failOnError>
32+
<spotbugs-maven-plugin.version>3.1.11</spotbugs-maven-plugin.version>
33+
<spotbugs.version>3.1.12</spotbugs.version>
34+
<spotbugs-maven-plugin.failOnError>true</spotbugs-maven-plugin.failOnError>
3435
</properties>
3536

3637
<build>
@@ -76,22 +77,30 @@
7677
</executions>
7778
</plugin>
7879
<plugin>
79-
<groupId>org.codehaus.mojo</groupId>
80-
<artifactId>findbugs-maven-plugin</artifactId>
81-
<version>${findbugs-maven-plugin.version}</version>
80+
<groupId>com.github.spotbugs</groupId>
81+
<artifactId>spotbugs-maven-plugin</artifactId>
82+
<version>${spotbugs-maven-plugin.version}</version>
8283
<configuration>
8384
<xmlOutput>true</xmlOutput>
84-
<failOnError>${findbugs-maven-plugin.failOnError}</failOnError>
85+
<failOnError>${spotbugs-maven-plugin.failOnError}</failOnError>
8586
</configuration>
8687
<executions>
8788
<execution>
88-
<id>run-findbugs</id>
89+
<id>run-spotbugs</id>
8990
<phase>verify</phase>
9091
<goals>
9192
<goal>check</goal>
9293
</goals>
9394
</execution>
9495
</executions>
96+
<dependencies>
97+
<!-- overwrite dependency on spotbugs if you want to specify the version of spotbugs -->
98+
<dependency>
99+
<groupId>com.github.spotbugs</groupId>
100+
<artifactId>spotbugs</artifactId>
101+
<version>${spotbugs.version}</version>
102+
</dependency>
103+
</dependencies>
95104
</plugin>
96105
<!-- Do not use gmaven plugin -->
97106
<plugin>
@@ -183,10 +192,10 @@
183192
<scope>test</scope>
184193
</dependency>
185194
<dependency>
186-
<groupId>com.google.code.findbugs</groupId>
187-
<artifactId>annotations</artifactId>
188-
<version>3.0.1</version>
189-
<scope>provided</scope>
195+
<groupId>com.github.spotbugs</groupId>
196+
<artifactId>spotbugs-annotations</artifactId>
197+
<version>${spotbugs.version}</version>
198+
<optional>true</optional>
190199
</dependency>
191200
</dependencies>
192201
<repositories>

0 commit comments

Comments
 (0)