I have maven project opened in Eclipse. But when I do clean and install, I get above error.
I changed my build path to use SE 1.8 and my compiler is also configured to use 1.8. You can see that in following screen shots.
I am seeing little red crosses in project explorer too. You can see that in following picture.
I am not sure why maven is using SE 1.7 when I have configured it to use 1.8 in Eclipse.
You need to configure maven to use 1.8 compatibility when compiling:
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<encoding>utf8</encoding>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
</plugins>
</build>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With