当我通过 maven 创建任何原型时,如何将编译器版本默认更改为 1.8。或者我是否必须在属性中的 POM 文件中指定每次
<properties>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
</properties>
目前,如果我不指定上述代码,我会收到错误消息:
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project unit-test: Compilation failure: Compilation failure:
[ERROR] Source option 1.5 is no longer supported. Use 1.6 or later.
[ERROR] Target option 1.5 is no longer supported. Use 1.6 or later.
[ERROR] -> [Help 1]
如果您的计算机上安装了 maven,则转到 maven 文件夹并将新配置文件添加到 conf/settings.xml
现在,当您在一个想法中创建项目时,请选中“maven”部分中默认旁边的框。