Hello,
I'm trying to add null away with error prone to my spring app, with this configuration:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.0</version>
<configuration>
<compilerId>javac-with-errorprone</compilerId>
<forceJavacCompilerUse>true</forceJavacCompilerUse>
<showWarnings>true</showWarnings>
<annotationProcessorPaths>
<path>
<groupId>com.uber.nullaway</groupId>
<artifactId>nullaway</artifactId>
<version>0.7.9</version>
</path>
</annotationProcessorPaths>
<compilerArgs>
<arg>-XDcompilePolicy=byfile</arg>
<arg>-Xplugin:ErrorProne</arg>
<arg>-Xep:NullAway:ERROR</arg>
<arg>-XepOpt:NullAway:AnnotatedPackages=com.uber</arg>
</compilerArgs>
</configuration>
<dependencies>
<dependency>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-compiler-javac-errorprone</artifactId>
<version>2.8</version>
</dependency>
<dependency>
<groupId>com.google.errorprone</groupId>
<artifactId>error_prone_core</artifactId>
<version>2.3.4</version>
</dependency>
</dependencies>
</plugin>
But, on start it keep telling me:
error: cannot access List
import java.util.List;
^
bad class file: /modules/java.base/java/util/List.class
class file has wrong version 55.0, should be 53.0
Please remove or make sure it appears in the correct subdirectory of the classpath.
Which means I'm trying to compile this for Java 8, when I'm using Java 11. This error appear in Idea and in CLI
I already check my javac version (11.0.4), java version (openJDK 11.0.4), my compiler settings in Idea (all modules to Java 11) and my project structure in Idea - Java 11. What I should try to make it works?
When I remove whole plugin from my pom file, it compiles successfully. I'm not sure, if this question belongs to this group or in nullaway group, in that case - sorry!
TIA
Jan Endel