Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support of JDK17 for groovy-eclipse-compiler #1314

Closed
pdesoyres opened this issue Nov 22, 2021 · 6 comments
Closed

Add support of JDK17 for groovy-eclipse-compiler #1314

pdesoyres opened this issue Nov 22, 2021 · 6 comments
Assignees
Labels
Milestone

Comments

@pdesoyres
Copy link

I'm trying to use the groovy-eclipse-compiler 3.7.0 maven plugin along with JDK17. But it fails with error:

[INFO] Using Groovy-Eclipse compiler to compile both Java and Groovy files
[INFO] source level should be in '1.1'...'1.8','9'...'15' (or '5.0'..'15.0'): 17

Am I missing something? Is there any plan on supporting JDK17?

pom file:

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <artifactId>xxx</artifactId>
    <version>1.0.0-SNAPSHOT</version>
    <packaging>jar</packaging>

    <properties>
        <maven.compiler.source>17</maven.compiler.source>
        <maven.compiler.target>17</maven.compiler.target>
    </properties>
    
    <dependencies>
        <dependency>
            <groupId>org.codehaus.groovy</groupId>
            <artifactId>groovy</artifactId>
            <version>3.0.9</version>
        </dependency>
    </dependencies>

    <build>
        <plugins>
	        <plugin>
		        <groupId>org.apache.maven.plugins</groupId>
		        <artifactId>maven-compiler-plugin</artifactId>
                <version>3.8.1</version>
		        <configuration>
			        <compilerId>groovy-eclipse-compiler</compilerId>
		        </configuration>
		        <dependencies>
			        <dependency>
				        <groupId>org.codehaus.groovy</groupId>
				        <artifactId>groovy-eclipse-compiler</artifactId>
				        <version>3.7.0</version>
			        </dependency>
			        <dependency>
				        <groupId>org.codehaus.groovy</groupId>
				        <artifactId>groovy-eclipse-batch</artifactId>
				        <version>3.0.8-01</version>
			        </dependency>
		        </dependencies>
	        </plugin>
        </plugins>
    </build>
</project>
@eric-milles
Copy link
Member

#1303 is still open. As soon as Eclipse 4.22 (2021-12) releases, the batch compiler can be built with support for Java 17. If you need this today, you can pull down the project and build the batch compiler following these steps: https://github.com/groovy/groovy-eclipse/wiki/Building-Maven-Batch-Compiler

I have artifacts that support up to Java 16, but the loss of bintray has set me back in terms of publication.

@eric-milles eric-milles added this to the v4.4.0 milestone Dec 5, 2021
@eric-milles
Copy link
Member

Eclipse 4.22 (2021-12) support has been finalized. You can build a batch compiler against this target for Java 17 joint compilation. Groovy 2.5 and Groovy 3 only support up to Java 15. Groovy 4 is at Release Candidate 1 and supports Java 17 (and 18).

@eric-milles
Copy link
Member

The batch compiler version 3.0.9-03 will run properly under JDK17 and will accept a target release of 17. This artifact is not signed and is not deployed to Maven Central, so there is an extra plugins repository required in you pom: https://github.com/groovy/groovy-eclipse/wiki/Groovy-Eclipse-Maven-plugin#how-to-use-the-compiler-plugin---setting-up-the-pom

@eric-milles eric-milles self-assigned this Dec 14, 2021
@pdesoyres
Copy link
Author

This is great news. Thank you @eric-milles

@venkatrao225
Copy link

@eric-milles when the artifcat would be available in Maven repo?

@eric-milles
Copy link
Member

#1359

@groovy groovy deleted a comment from venkatrao225 Oct 27, 2022
@groovy groovy locked and limited conversation to collaborators Oct 27, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants