java 13 preview options with Maven

Answered

Idea Ultimate 2012.2. I'm trying java 13 preview features with OpenJdk 13 (early-access).

In pom.xml I use: 

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<configuration>
<compilerArgument>--enable-preview</compilerArgument>
<source>13</source>
<target>13</target>
</configuration>
</plugin>

it's anough for Maven.

But when I set language level to "13 (preview)" in Idea, I see: "Module... is imported from Maven. Any changes made... may be lost after reimporting"

And, really, the level is reset every time when pom.xml is changed.

How can I set "preview" language level permanently in a maven project?

0
4 comments

Where do you change the language level?

The effective level is set for the module in modules settings Sources tab:

This works fine for me with 2019.2.1 RC.

0

Yes, it's here. I have no problem with the level "13 (No new...)". What about the "13 (preview)" language level in your version?

0

>What about the "13 (preview)" language level in your version?

There is an issue currently with the "Preview" language levels: https://youtrack.jetbrains.com/issue/IDEA-212618

0

Thanks, I added my vote to the issue.

0

Please sign in to leave a comment.