Build path specifies execution environment J2SE-1.5. There are no JREs installed in the workspace that are strictly compatible with this environment.
新建maven2工程时,会自动将jre library指向为j2se-1.5,而不是我安装的jdk1.6, 在java build path 中奖j2se-1.5移除掉又选择jdk1.6后,右键项目maven -》update project..又把我的jdk改成了1.5. 后来更改maven 的pom文件才解决这一问题:MavenProject org.apache.maven.plugins maven-compiler-plugin
改为1.7后,又变回1.5,增加上面插件即可解决