When we created a new project in Eclipse, you would have observed the following warning:
Why does this error occur? This is because the Maven Compiler plugin, by default, considers the
target Java version to be
1.5 (for backward compatibility reasons).
Let us resolve this warning.
Let us assume you have configured Java 8 as the default Java runtime in Eclipse, and perform the following steps:
<plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> ...