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

I can't build project with Java 17 #196

Closed
delor opened this issue Sep 16, 2021 · 2 comments
Closed

I can't build project with Java 17 #196

delor opened this issue Sep 16, 2021 · 2 comments
Assignees
Milestone

Comments

@delor
Copy link

delor commented Sep 16, 2021

I can't build project with Java 17. I'm getting following error:

[ERROR] Failed to execute goal org.codehaus.gmavenplus:gmavenplus-plugin:1.12.1:generateTestStubs (default) on project java-17-gmavenplus-problem: Execution default of goal org.codehaus.gmavenplus:gmavenplus-plugin:1.12.1:generateTestStubs failed: Unrecognized target bytecode: '17'. -> [Help 1]

with this pom

<?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/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <groupId>org.example</groupId>
    <artifactId>java-17-gmavenplus-problem</artifactId>
    <version>1.0-SNAPSHOT</version>

    <properties>
        <maven.compiler.source>17</maven.compiler.source>
        <maven.compiler.target>17</maven.compiler.target>
    </properties>

    <build>
        <plugins>
            <plugin>
                <groupId>org.codehaus.gmavenplus</groupId>
                <artifactId>gmavenplus-plugin</artifactId>
                <version>1.12.1</version>
                <executions>
                    <execution>
                        <goals>
                            <goal>addSources</goal>
                            <goal>addTestSources</goal>
                            <goal>generateStubs</goal>
                            <goal>compile</goal>
                            <goal>generateTestStubs</goal>
                            <goal>compileTests</goal>
                            <goal>removeStubs</goal>
                            <goal>removeTestStubs</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.8.1</version>
            </plugin>
        </plugins>
    </build>
    
    <dependencies>
        <dependency>
            <groupId>org.codehaus.groovy</groupId>
            <artifactId>groovy-all</artifactId>
            <version>3.0.7</version>
            <type>pom</type>
        </dependency>
    </dependencies>
</project>
@chiquitinxx
Copy link
Contributor

I have created this PR, let me know if I can improve

keeganwitt added a commit that referenced this issue Sep 18, 2021
keeganwitt added a commit that referenced this issue Sep 19, 2021
keeganwitt added a commit that referenced this issue Sep 19, 2021
keeganwitt added a commit that referenced this issue Sep 19, 2021
keeganwitt added a commit that referenced this issue Sep 19, 2021
keeganwitt added a commit that referenced this issue Sep 19, 2021
@keeganwitt keeganwitt added this to the 1.13.0 milestone Sep 19, 2021
@keeganwitt
Copy link
Member

keeganwitt commented Sep 19, 2021

Paul mentioned some caveats to using Java >= 16 with Groovy 3, which I'm linking here for visibility.

#197 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants