I imported a Maven project and it used Java 1.5 even though I have 1.6 configured as my Eclipse default
The m2eclipse plugin doesn't use Eclipse defaults, the m2eclipse plugin derives the settings from the POM. So if you want a Maven project to be configured to use Java 1.6 settings when imported under Eclipse, configure the
maven-compiler-plugin appropriately, as I already suggested:
<plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <version>2.1</version> <configuration> <source>1.6</source> <target>1.6</target> </configuration> </plugin>
If your project is already imported, update the project configuration (right-click on the project then Maven V Update Project Configuration).