直接修改IDE所使用的maven的settings.xml文件。在文件中添加profile标签。
<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>
本文介绍如何通过修改Maven的settings.xml文件,添加profile标签来指定使用Java 1.8进行项目编译。这包括设置默认激活状态、源代码版本、目标代码版本及编译器版本。
1万+

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



