Skip to content
This repository has been archived by the owner on Jul 30, 2021. It is now read-only.

Compiler option --enable-preview #59

Open
giugallo opened this issue Apr 30, 2020 · 2 comments
Open

Compiler option --enable-preview #59

giugallo opened this issue Apr 30, 2020 · 2 comments

Comments

@giugallo
Copy link

I didn't find a way to specify compiler option --enable-preview like in maven-compiler-plugin. In the maven-compiler-plugin can be specified in this way

<configuration>
   <release>14</release>
     <compilerArgs>
	--enable-preview
     </compilerArgs>
</configuration>

I'm tring to use the new TextBlocks feature of java 13/14, but now the apt-maven-plugin is not anymore able to generate QClasses. The error is text blocks are a preview feature and are disabled by default. (use --enable-preview to enable text blocks)

@ciroanacleto
Copy link

I can't found too, I had to upgrade to jdk 14 in order to use switch expressions.

@rsandtner
Copy link

just ran into this problem too and think since there is not much support here I want to let you know my bloody workaround

specify a compiler option that does not hurt and doesn't expect a value and specify --enable-preview as value

<compilerOptions>
  <source>${java.version}</source>
  <deprecation>--enable-preview</deprecation>
</compilerOptions>

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants