【发布时间】:2019-11-20 08:39:42
【问题描述】:
我们知道,在maven项目中,我们可以设置以下属性来指定插件maven-compiler-plugin的java版本:
<maven.compiler.target>1.8</maven.compiler.target>
<maven.compiler.source>1.8</maven.compiler.source>
问题是,如果要使用上面的属性,要不要在本地安装jdk8?
【问题讨论】:
-
如果你想为 JDK 8 编译,你应该至少使用 JDK8...如果你使用 JDK9+,你也应该使用
<maven.compiler.release>8</maven.compiler.release>以及这意味着所有其他属性也要更改为 @987654323 @ 而不是1.8
标签: maven maven-compiler-plugin