Reputation: 7236
I get this error when I run mvn clean package
in my IntelliJ terminal:
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.6.1:compile (default-compile) on project protection: Fatal error compiling: invalid target release: 1.8 -> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
Is this telling me that it is trying to compile with Java 1.8 or that it expects Java 1.8 but the available version is not correct?
Upvotes: 0
Views: 79
Reputation: 1
You are using 1.8.And the default value for the compiler is 1.6 so you need to change the plugin properties to:
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
</plugins>
Upvotes: 0