This patch upgrades the SpotBugs plugin to 3.1.3 and the engine to
3.1.2. The changelog is
https://github.com/spotbugs/spotbugs/blob/3.1.2/CHANGELOG.md
SpotBugs 3.1.2 supports the nullable annotations in Checker Framework
(see
https://github.com/spotbugs/spotbugs/commit/
dd436ff56abf0273a080ad228fcf5abd8ee3a097
for the patch), so we can re-enable NP_NONNULL_PARAM_VIOLATION when
using SpotBugs. This involves using a separate configuration, so this
patch splits everything out, including the report directory for
projects which run both FindBugs and SpotBugs.
Change-Id: I8cb110f12d79414d476b7a6c525412f3b7e2c188
Signed-off-by: Stephen Kitt <skitt@redhat.com>
<plugin>
<groupId>com.github.spotbugs</groupId>
<artifactId>spotbugs-maven-plugin</artifactId>
- <version>3.1.1</version>
+ <version>3.1.3</version>
<dependencies>
<dependency>
<groupId>com.github.spotbugs</groupId>
<artifactId>spotbugs</artifactId>
- <version>3.1.1</version>
+ <version>3.1.2</version>
</dependency>
<dependency>
<groupId>org.opendaylight.odlparent</groupId>
- <artifactId>findbugs</artifactId>
+ <artifactId>spotbugs</artifactId>
<version>4.0.0-SNAPSHOT</version>
</dependency>
</dependencies>
<!-- Build doesn't fail if problems are found -->
<failOnError>false</failOnError>
<!-- References the excluded rules -->
- <excludeFilterFile>findbugs-exclude.xml</excludeFilterFile>
+ <excludeFilterFile>spotbugs-exclude.xml</excludeFilterFile>
<!-- Produces XML report -->
<xmlOutput>true</xmlOutput>
<!-- Configures the directory in which the XML report is created -->
- <findbugsXmlOutputDirectory>${project.build.directory}/findbugs</findbugsXmlOutputDirectory>
+ <findbugsXmlOutputDirectory>${project.build.directory}/spotbugs</findbugsXmlOutputDirectory>
</configuration>
<executions>
<!--
<!-- odlparent tools -->
<module>checkstyle</module>
<module>findbugs</module>
+ <module>spotbugs</module>
<module>license</module>
<!-- Features test (SFT) -->
--- /dev/null
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.opendaylight.odlparent</groupId>
+ <artifactId>odlparent-lite</artifactId>
+ <version>4.0.0-SNAPSHOT</version>
+ <relativePath>../odlparent-lite</relativePath>
+ </parent>
+
+ <artifactId>spotbugs</artifactId>
+ <name>ODL :: odlparent :: ${project.artifactId}</name>
+
+ <build>
+ <pluginManagement>
+ <plugins>
+ <plugin>
+ <artifactId>maven-jar-plugin</artifactId>
+ <version>3.0.2</version>
+ </plugin>
+ <plugin>
+ <artifactId>maven-resources-plugin</artifactId>
+ <version>3.0.1</version>
+ </plugin>
+ </plugins>
+ </pluginManagement>
+ </build>
+
+ <scm>
+ <connection>scm:git:ssh://git.opendaylight.org:29418/odlparent.git</connection>
+ <developerConnection>scm:git:ssh://git.opendaylight.org:29418/odlparent.git</developerConnection>
+ <tag>HEAD</tag>
+ <url>https://wiki.opendaylight.org/view/ODL_Root_Parent:Main</url>
+ </scm>
+
+ <!--
+ Maven Site Configuration
+
+ The following configuration is necessary for maven-site-plugin to
+ correctly identify the correct deployment path for OpenDaylight Maven
+ sites.
+ -->
+ <url>${odl.site.url}/${project.groupId}/${stream}/${project.artifactId}/</url>
+ <distributionManagement>
+ <site>
+ <id>opendaylight-site</id>
+ <url>${nexus.site.url}/${project.artifactId}/</url>
+ </site>
+ </distributionManagement>
+
+</project>
--- /dev/null
+<FindBugsFilter>
+ <Match>
+ <Or>
+ <Package name="~.*protobuff\.messages.*" />
+ <Package name="~org\.opendaylight\.yang\.gen\..*" />
+ <Package name="~org\.opendaylight\.controller\.config\.yang\.config\..*" />
+ </Or>
+ </Match>
+
+ <Match>
+ <Or>
+ <!-- Anonymous inner classes are very common in ODL. -->
+ <Bug pattern="SIC_INNER_SHOULD_BE_STATIC_ANON" />
+
+ <!-- We use static slf4j Logger (this rule is from KengoTODA/findbugs-slf4j jp.skypencil.findbugs.slf4:bug-pattern) -->
+ <Bug pattern="SLF4J_LOGGER_SHOULD_BE_NON_STATIC" />
+ </Or>
+ </Match>
+</FindBugsFilter>