Intellij doesn't respect the "release" configuration parameter for maven-compiler-plugin
I have configured the maven-compiler-plugin in following way in my pom
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.0</version>
<configuration>
<release>11</release>
</configuration>
</plugin>
When I try to build the project I get
Error:java: error: release version 5 not supported
If I add the following to the configuration it builds without any errors
<source>11</source>
<target>11</target>
I guess since "release" is a new configuration param for the compiler plugin. IntelliJ ignores it. It would be nice if this was supported.
Cheers!
ref :
https://maven.apache.org/plugins/maven-compiler-plugin/compile-mojo.html#release
https://docs.oracle.com/en/java/javase/11/tools/javac.html
Platform details :
IntelliJ IDEA 2018.2.5 (Ultimate Edition)
Build #IU-182.4892.20, built on October 16, 2018
JRE: 1.8.0_152-release-1248-b19 x86_64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
macOS 10.13.6
Please sign in to leave a comment.
Please try 2018.3 preview. This option has been added: https://youtrack.jetbrains.com/issue/IDEA-173143.
Thanks for your response Andrey. I'd prefer not to use EAP version. Do you know when 2018.3 will be released ? Also the issue might still be there. Please see : https://youtrack.jetbrains.com/issue/IDEA-199873
The https://youtrack.jetbrains.com/issue/IDEA-199873 is obsolete with 2018.3 (works for me).
2018.3 release is planned by the end of the month.
I have release 2019.1.3 and have the same issue. Any ideas?
Configure source/target or release properties in pom.xml to the version of the JDK you are using (12).