I have just cloned a git repository for a maven project and then imported the project into STS as a maven project.
I set up the project and sub-modules as java 1.8 projects and then ran a maven update and then noticed that all the java 1.5 compiler settings seem to have been reapplied.
I cant figure out why eclipse is resetting this, even if I uncheck 'Enable project specific settings' it still reverts back to having this checked and for java 5 to be the default.
I read a post about setting the version in the maven-compiler-plugin configuration but this project does not currently have any configuration for that plugin in any of the pom files.
In your pom.xml
put this:
<project>
...
<properties>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
</properties>
...
</project>
The reason you'll have to do this is that "the default source setting is 1.5 and the default target setting is 1.5, independently of the JDK you run Maven with". See Maven Compiler Plugin for further details.
When you run Maven update command from Eclipse without setting the explicit java version, the project will take the default Maven settings, that's why you end up with 1.5 Java version.