[
https://issues.apache.org/jira/browse/SLING-12305?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Robert Munteanu resolved SLING-12305.
-------------------------------------
Resolution: Fixed
> Build fails on Java 21 due to invoker plug-in: Unsupported class file major
> version 65
> --------------------------------------------------------------------------------------
>
> Key: SLING-12305
> URL: https://issues.apache.org/jira/browse/SLING-12305
> Project: Sling
> Issue Type: Bug
> Affects Versions: OSGi Feature Maven Plugin 1.8.0
> Reporter: Robert Munteanu
> Assignee: Robert Munteanu
> Priority: Major
> Fix For: OSGi Feature Maven Plugin 1.8.4
>
>
> The invoker plugin-ins runs groovy scripts in the {{verify}} goal, and this
> fails on Java 21 with
> {noformat}
> [INFO] --- invoker:3.5.1:integration-test (integration-test) @
> slingfeature-maven-plugin ---
> [INFO] Building: analyzer-apiregions-errors-detected/pom.xml
> [INFO] run post-build script verify.groovy
> [INFO] BUG! exception in phase 'semantic analysis' in source unit
> 'Script1.groovy' Unsupported class file major version 65
> [INFO] analyzer-apiregions-errors-detected/pom.xml ...... FAILED
> (3.0 s)
> {noformat}
> The stack trace seems to indicate that Groovy tries to parse Java 21 bytecode
> and fails.
> {noformat}
> Caused by: java.lang.IllegalArgumentException: Unsupported class file major
> version 65
> at groovyjarjarasm.asm.ClassReader.<init>(ClassReader.java:199)
> at groovyjarjarasm.asm.ClassReader.<init>(ClassReader.java:180)
> at groovyjarjarasm.asm.ClassReader.<init>(ClassReader.java:166)
> at groovyjarjarasm.asm.ClassReader.<init>(ClassReader.java:287)
> at
> org.codehaus.groovy.ast.decompiled.AsmDecompiler.parseClass(AsmDecompiler.java:83)
> {noformat}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)