For some reason maven automatically chooses java compiler 1.5 when building my project although I have jdk 1.8 installed
Step 1
Project -> Properties -> Java Build Path -> JRE System Library -> Edit
,
and then choose "Workspace default JRE (jdk1.8.0_102)".
Step 2
Just in case I also set Eclipse -> Preferences -> Installed JREs -> JavaSE-1.8 (jdk.1.8.0_102)
What I noticed in that window: There is only J2SE-1.x where x<=5
Step 3
Then I go to `Project -> Java Compiler, where I find the compiler compliance level set to 1.5 (see screenshot). So I change "Compiler compliance level to 1.8"
When I do maven update, everything is reset to compiler compliance 1.5. If I do a mvn clean compile
I also get a build failure that source is 1.5 and some of my code is not compatible.
Thanks for the help