Use Error Prone
Error Prone is a static analysis tool for Java that exposes common
programming mistakes at compile time.
<arg>-Xlint:deprecation</arg>
<arg>-Xlint:unchecked</arg>
</compilerArgs>
+ <compilerId>javac-with-errorprone</compilerId>
+ <forceJavacCompilerUse>true</forceJavacCompilerUse>
<source>${java.version}</source>
<target>${java.version}</target>
</configuration>
+ <dependencies>
+ <dependency>
+ <groupId>com.google.errorprone</groupId>
+ <artifactId>error_prone_core</artifactId>
+ <version>2.3.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.codehaus.plexus</groupId>
+ <artifactId>plexus-compiler-javac-errorprone</artifactId>
+ <version>2.8.4</version>
+ </dependency>
+ </dependencies>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
