打开%maven_home%\conf\setting.xml,只会在新建项目时自动使用1.6的导入项目不会
在标签内添加如下配置:
<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默认使用的JRE版本,需要编辑%maven_home%confsettings.xml文件。在相应标签内添加配置,确保新建项目时使用指定的JRE版本。
444

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



