Reprinted from: http://xiaoyaozjl.iteye.com/blog/1530010
Add to the <build></build> tag of the project's pom.xml:
<plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <version>2.3.2</version> <configuration> <source>1.6</source> <target>1.6</target> </configuration> </plugin> </plugins>