Skip to content

Preview features enabled at an invalid source release level 23, preview can be enabled only at source level 24 #3996

@Fabccc

Description

@Fabccc

When enabling preview feature in the pom.xml within the maven-compiler-plugin, i'm getting a "Preview features enabled at an invalid source release level 23, preview can be enabled only at source level 24", but I can't upgrade maven, the 3.9.10 is not released yet so it does not support Java 24.
VSCode stop showing syntax errors, and I can't rename classes, nor variable.

<artifactId>maven-compiler-plugin</artifactId>
<version>${compiler-plugin.version}</version>
<configuration>
  <compilerArgs>
    <arg>--enable-preview</arg>
    <arg>-Xlint:preview</arg>
  </compilerArgs>
</configuration>

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions