(1)需要设置JDK
Windows -> Perferences -> Java -> Installed JRES
加入JDK 如:D:\Program Files\Java\jdk1.8.0_92
Maven update
Maven clean
project clean
build project eclipse::eclipse
(2)环境的问题。
在maven下conf文件夹里的setting中的加入:
<profile>
<id>jdk18</id>
<activation>
<activeByDefault>true</activeByDefault>
<jdk>1.8</jdk>
</activation>
<properties>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<maven.compiler.compilerVersion>1.8</maven.compiler.compilerVersion>
</properties>
</profile>