groovy / GMavenPlus

A rewrite of GMaven, a Maven plugin for Groovy
Other
285 stars 35 forks source link

Add JDK 19 support #230

Closed Joan-Lara-Miquel closed 2 years ago

Joan-Lara-Miquel commented 2 years ago

Hi,

once updating my spring boot project to Java 19, via some properties:

<properties> 
     <java.version>19</java.version>
</properties>

I get the following error when running the compile and compileTests goals:

[ERROR] Failed to execute goal org.codehaus.gmavenplus:gmavenplus-plugin:2.0.0:compileTests (default) on project foo: Execution default of goal org.codehaus.gmavenplus:gmavenplus-plugin:2.0.0:compileTests failed: Unrecognized target bytecode: '19'. This check can be skipped with 'skipBytecodeCheck', but this may result in a different target bytecode being used.

This is my plugin setup:

<plugin>
        <groupId>org.codehaus.gmavenplus</groupId>
        <artifactId>gmavenplus-plugin</artifactId>
        <version>2.0.0</version>
        <executions>
          <execution>
            <goals>
              <goal>compile</goal>
              <goal>compileTests</goal>
            </goals>
          </execution>
        </executions>
</plugin>

Can 19 be added to the bytecode verifications?

keeganwitt commented 2 years ago

Thank you for reporting this!

This will be in the next release, which I'll aim to do this week. In the meantime, you can temporarily skip the bytecode check to suppress this failure. Just be aware this requires Groovy >= 4.0.2 to use bytecode 19.