querydsl / apt-maven-plugin

Maven APT plugin
Apache License 2.0
79 stars 41 forks source link

Compiler option --enable-preview #59

Open giugallo opened 4 years ago

giugallo commented 4 years ago

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 commented 4 years ago

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

rsandtner commented 3 years ago

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>