Pi4J / pi4j-maven-archetype

A Maven archetype to remotely build, run and debug a PI4J-V2 program on a target Raspberry Pi
Apache License 2.0
9 stars 4 forks source link

Installation fails with Java 17 #8

Open mipastgt opened 2 years ago

mipastgt commented 2 years ago

Running mvn install with the latest version of Maven (3.8.5) and Java 17 results in the following error:

[INFO] --- gmavenplus-plugin:1.12.1:compile (default) @ raspimaven-archetype ---
[INFO] Using isolated classloader, without GMavenPlus classpath.
[INFO] Using Groovy 3.0.7 to perform compile.
[INFO] Parallel parsing disabled.
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  5.204 s
[INFO] Finished at: 2022-04-22T15:58:54+02:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.codehaus.gmavenplus:gmavenplus-plugin:1.12.1:compile (default) on project raspimaven-archetype: Error occurred while calling a method on a Groovy class from classpath.: InvocationTargetException: BUG! exception in phase 'semantic analysis' in source unit '/Users/mpaus/Downloads/tmp/pi4j-maven-archetype-main/src/main/resources/META-INF/archetype-post-generate.groovy' Unsupported class file major version 61 -> [Help 1]

It seems Java 17 is not supported yet (although it is an LTS release and we are at Java 18 already).

FDelporte commented 8 months ago

New groovy version was needed according to feedback I got on Mastodon.

See https://github.com/Pi4J/pi4j-maven-archetype/commit/63f9c9ab39cc3a9ee138e0b2c7e8dd3e0ebd8308

@mipastgt can you validate this change please?