[英]Maven compiler plugin specification
If my JDK version is 1.8 and I suppose my project will be running on JDK 1.8. 如果我的JDK版本是1.8,并且我想我的项目将在JDK 1.8上运行。 Do I still need to specify this maven property in my pom file?
我还需要在pom文件中指定此maven属性吗?
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
I thought if I am using Jdk 1.8 and I want my project to be compatible with JDK 1.7, then I need this specification. 我以为如果我正在使用Jdk 1.8,并且希望我的项目与JDK 1.7兼容,那么我需要这个规范。 Is that true?
真的吗?
您必须始终指定这些属性,否则Maven会将它们默认设置为1.5
。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.