ハイ、
src
私のMavenセットアップには、ソースコードを生成してJavaフォルダーに入れるプラグインがあります。
このコードは自動生成されるため、すべての SpotBugs チェックから除外したいと思います。
ファイル構造は次のとおりです。
-- src
|
--- generated <-- No files in this folder should be checked
|
--- main <-- The "normal" java files, which should be checked
以下を含むいくつかのことを試しましたが、何も機能しません。
<FindBugsFilter>
<Match>
<Source name="~.*generated.*"/>
</Match>
</FindBugsFilter>
これは、pom.xml での私のプラグイン構成です。
<plugin>
<groupId>com.github.spotbugs</groupId>
<artifactId>spotbugs-maven-plugin</artifactId>
<version>4.2.0</version>
<configuration>
<excludeFilterFile>config/spotbugs-excludes.xml</excludeFilterFile>
<effort>Max</effort>
<threshold>Normal</threshold>
<failOnError>true</failOnError>
<includeTests>false</includeTests>
<spotbugsXmlOutput>true</spotbugsXmlOutput>
<xmlOutput>true</xmlOutput>
<plugins>
<plugin>
<groupId>com.h3xstream.findsecbugs</groupId>
<artifactId>findsecbugs-plugin</artifactId>
<version>1.11.0</version>
</plugin>
<plugin>
<groupId>com.mebigfatguy.fb-contrib</groupId>
<artifactId>fb-contrib</artifactId>
<version>7.4.3.sb</version>
</plugin>
</plugins>
</configuration>
<executions>
<execution>
<goals>
<goal>check</goal>
</goals>
<phase>generate-test-sources</phase>
</execution>
</executions>
</plugin>
クリスに挨拶