Skip to content

JDK 14 + preview-features not working correctly #1167

@mojo2012

Description

@mojo2012

Hello,

our project uses maven with eclipse 4.16 and 4.17, latest greclipse release (also same on snapshot) java 14, groovy 3 and joint compilation, configured like this:

<plugin>
	<artifactId>maven-compiler-plugin</artifactId>
	<extensions>true</extensions>
	<dependencies>
		<dependency>
			<groupId>org.codehaus.groovy</groupId>
			<artifactId>groovy-eclipse-compiler</artifactId>
			<version>3.6.0-03</version>
		</dependency>
		<dependency>
			<groupId>org.codehaus.groovy</groupId>
			<artifactId>groovy-eclipse-batch</artifactId>
			<version>3.0.5-01</version>
		</dependency>
		<dependency>
			<groupId>org.codehaus.groovy</groupId>
			<artifactId>groovy</artifactId>
			<version>3.05</version>
			<classifier>indy</classifier>
		</dependency>
	</dependencies>
	<configuration>
		<compilerId>groovy-eclipse-compiler</compilerId>
		<compilerArgs>
			--enable-preview
		</compilerArgs>
		<compilerArguments>
			<indy />
			<configScript>${pom.basedir}/config.groovy</configScript>
		</compilerArguments>
		<failOnWarning>false</failOnWarning>
		<showWarnings>false</showWarnings>
		<verbose>false</verbose>
	</configuration>
</plugin>

Today I updated the groovy plugin and all of a sudden the code in eclipse doesnot compile anymore.
This error is reported:
Groovy:General error during conversion: java.lang.UnsupportedClassVersionError: Preview features are not enabled for Expression$47d4a77a$cf5f$4775$8b57$07d99aa7e980 (class file version 58.65535). Try running with '--enable-preview' PriceData.groovy

Preview features are enabled on the Eclipse jvm compiler settings too. And it worked up till now!

Yesterday (or the day before) there was an update too and there it still worked.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions