Maven配置文件中修改默认jre

来源:互联网 发布:调用接口获取json数据 编辑:程序博客网 时间:2024/04/25 21:29

打开%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>
0 0
原创粉丝点击