问题:http://start.spring.io/下载一个jdk1.8的maven初始项目,导入到eclipse莫名的变成1.5。eclipse版本:Kepler Service Release 2
解决:1.eclipse设置好java相关的编译环境为1.8。
2.设置maven的setting文件,在<profiles>节点下手动添加
<profile>
<id>jdk-1.8</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>
3.下载Java 8 Facets for web tools eclipse kepler sr2插件,具体见:https://stackoverflow.com/questions/21955207/version-1-8-of-project-facet-java-does-not-exist
说明:第3步解决了eclipse下新建jdk1.8的maven项目时报“Version 1.8 of project facet java does not exist”。
本文解决在Eclipse Kepler SR2中创建Maven项目时,默认编译环境变为JDK1.5的问题。通过调整Eclipse设置、修改maven setting文件及安装Java8Facets插件,确保项目使用正确的JDK1.8环境。

155

被折叠的 条评论
为什么被折叠?



