Skip to content

Commit 8c46fff

Browse files
update spotbugs
1 parent 0660a89 commit 8c46fff

1 file changed

Lines changed: 41 additions & 20 deletions

File tree

pom.xml

Lines changed: 41 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -111,26 +111,6 @@
111111
<waitUntil>published</waitUntil>
112112
</configuration>
113113
</plugin>
114-
<plugin>
115-
<groupId>com.github.spotbugs</groupId>
116-
<artifactId>spotbugs-maven-plugin</artifactId>
117-
<version>4.6.0.0</version>
118-
<configuration>
119-
<effort>Max</effort>
120-
<threshold>Low</threshold>
121-
<xmlOutput>true</xmlOutput>
122-
<excludeFilterFile>findbugs-exclude.xml</excludeFilterFile>
123-
</configuration>
124-
<executions>
125-
<execution>
126-
<id>analyze-compile</id>
127-
<phase>compile</phase>
128-
<goals>
129-
<goal>check</goal>
130-
</goals>
131-
</execution>
132-
</executions>
133-
</plugin>
134114
<plugin>
135115
<groupId>org.apache.maven.plugins</groupId>
136116
<artifactId>maven-jar-plugin</artifactId>
@@ -226,4 +206,45 @@
226206
</plugins>
227207
</build>
228208

209+
<profiles>
210+
<!--
211+
SpotBugs 4.8+ requires Java 11+ to run, and its bundled ASM is what
212+
understands modern (Java 21/23+) class files. The build/test matrix
213+
still includes JDK 8 to verify the Java 8 runtime floor, so SpotBugs
214+
is gated to JDK 11+ only: it runs on 11/17/21 (covering the same
215+
sources) and is simply absent on JDK 8, where the plugin's Java 11
216+
bytecode cannot even be loaded.
217+
-->
218+
<profile>
219+
<id>spotbugs</id>
220+
<activation>
221+
<jdk>[11,)</jdk>
222+
</activation>
223+
<build>
224+
<plugins>
225+
<plugin>
226+
<groupId>com.github.spotbugs</groupId>
227+
<artifactId>spotbugs-maven-plugin</artifactId>
228+
<version>4.9.3.0</version>
229+
<configuration>
230+
<effort>Max</effort>
231+
<threshold>Low</threshold>
232+
<xmlOutput>true</xmlOutput>
233+
<excludeFilterFile>findbugs-exclude.xml</excludeFilterFile>
234+
</configuration>
235+
<executions>
236+
<execution>
237+
<id>analyze-compile</id>
238+
<phase>compile</phase>
239+
<goals>
240+
<goal>check</goal>
241+
</goals>
242+
</execution>
243+
</executions>
244+
</plugin>
245+
</plugins>
246+
</build>
247+
</profile>
248+
</profiles>
249+
229250
</project>

0 commit comments

Comments
 (0)