I imported a Maven project and it used Java 1.5 even though I have 1.6 configured as my Eclipse default Preferences->Java->Installed JREs.
When I
I wanted to add something to the answer already provided. maven-compiler-plugin by default will compile your project using Java 1.5 which is where m2e get's its information.
That's why you have to explicitly declare the maven-compiler-plugin in your project with something other then 1.5. Your effective pom.xml will implicitly use the default set in the maven-compiler-plugin pom.xml.