Use enable-preview via compiler argument option in the maven-compiler-plugin because IntelliJ does not recognize the configuration option

This commit is contained in:
Filip Hrisafov 2024-01-03 20:14:45 +01:00 committed by Gunnar Morling
parent 5d8d91e0e8
commit fd92f5e807

View File

@ -101,9 +101,14 @@
<artifactId>maven-compiler-plugin</artifactId>
<version>3.12.1</version>
<configuration>
<enablePreview>true</enablePreview>
<parameters>true</parameters>
<compilerArgs>
<!--
IntelliJ does not yet support the enablePreview configuration option.
Therefore, we use a compiler argument.
See https://youtrack.jetbrains.com/issue/IDEA-296303
-->
<compilerArg>--enable-preview</compilerArg>
<compilerArg>--add-modules</compilerArg>
<compilerArg>java.base,jdk.incubator.vector</compilerArg>
</compilerArgs>