概要
mvn findbugs:check
にひっかかったらテストこけるようにする。
pom.xml
build 要素に以下を追加する。
pom.xml
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>findbugs-maven-plugin</artifactId>
<version>3.0.0</version>
<executions>
<execution>
<id>findbugs-test</id>
<phase>test</phase>
<goals>
<goal>check</goal>
</goals>
</execution>
</executions>
</plugin>
できた!
CI と組み合わせると幸せ度があがる感じ。
続きまして
Eclipse の Warnings がある場合に mvn package
こけるようにしたい。