Why does IntelliJ set maven.compiler.source as 8 instead of 1.8?
Answered
When creating a new project, IntelliJ add the followings in the pom file (ignored any other lines it adds for brevity):
<properties>
<maven.compiler.source>8</maven.compiler.source>
<maven.compiler.target>8</maven.compiler.target>
</properties>
but everywhere online I find that this should be 1.8 instead of 8. For example here, it explicitly says from Java 9 onward we can use 9, and for Java 8 it should be 1.8. My question is why IntelliJ sets it to 8 whereas everyone is saying it should be 1.8?
Please sign in to leave a comment.
Hello,
Both ways are possible.