This is to help remember the maven compiler plugin that can resolve a common issue that people have experienced with Maven projects in IntelliJ.

There is a possibility of the version resetting to an old version of Java which would fail to automatically import and leave everything red. Set the source and target versions to make it clear what versions it should be using.

Issue reference:

Java version resetting to 1.5

IntelliJ Maven compiler options

Via properties: Setting the -source and -target of the Java Compiler


Via the plugin:


Java 9+ can use whole numbers. More information by Nguyen the champion: Maven Compiler Plugin

Leave a comment

Your email address will not be published. Required fields are marked *