IntelliJ Fatal error compiling: error: invalid target release: 14

Alvaro Andres Pinzon Cortes
2 min readMay 13, 2021
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.0:compile (default-compile) on project catpoint-parent: Fatal error compiling: error: invalid target release: 14 -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.0:compile (default-compile) on project catpoint-parent: Fatal error compiling

The complete error log can be consulted here.

Solution 1: Set the correct project jdk version in the IDEA

If the project’s jdk version is defined in the project’s project structure you need to make sure that it is the same as in the pom.xml

Project structure
pom.xml

This page in IntelliJ’s docs will show you how to modify the Project structure settings.

If the project structure jdk version is not set you need to change the boot Java runtime of the IDE and make sure that it is the same as in the pom.xml

This page in IntelliJ’s docs will show you how to modify the boot jdk runtime of the IDE.

Solution 2: Set the correct project jdk version in the pom.xml

For example, if your pom.xml has jdk 14, but you have jdl 11, change the jdk version to 11:

--

--