[ 
https://issues.apache.org/jira/browse/GROOVY-10782?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17642306#comment-17642306
 ] 

Olivier Lamy edited comment on GROOVY-10782 at 12/2/22 7:04 AM:
----------------------------------------------------------------

it looks the same issue is here even with org.apache.groovy:groovy:jar:4.0.6
I tried an upgrade with the branch MINVOKER-312 of this repository 
https://github.com/apache/maven-invoker-plugin.git
just run: mvn -Dtest=FOO install -Prun-its 
-Dinvoker.test=invocation-environmentvariable  
-Dsurefire.failIfNoSpecifiedTests=false
and you will have the same stacktrace 
The code to evaluate the groovy script is located here 
https://github.com/apache/maven-script-interpreter/blob/8af16f6ee11f8728d59a69f88424be005a435ff1/src/main/java/org/apache/maven/shared/scriptinterpreter/GroovyScriptInterpreter.java#L61


was (Author: olamy):
it looks the same issue is here even with org.apache.groovy:groovy:jar:4.0.6
I tried an upgrade with the branch MINVOKER-312 of this repository 
https://github.com/apache/maven-invoker-plugin.git
just run: mvn -Dtest=FOO install -Prun-its 
-Dinvoker.test=invocation-environmentvariable  
-Dsurefire.failIfNoSpecifiedTests=false
and you will have the same stacktrace 

> Support for java 19
> -------------------
>
>                 Key: GROOVY-10782
>                 URL: https://issues.apache.org/jira/browse/GROOVY-10782
>             Project: Groovy
>          Issue Type: New Feature
>    Affects Versions: 3.0.12, 3.0.13
>            Reporter: Slawomir Jaranowski
>            Priority: Major
>
> During executing groovy verification  script by {{{}maven-invoker-plugin{}}}, 
> we have something like:
> {code:java}
>  BUG! exception in phase 'semantic analysis' in source unit 'Script1.groovy' 
> Unsupported class file major version 63
>    at 
> org.codehaus.groovy.control.CompilationUnit$ISourceUnitOperation.doPhaseOperation(CompilationUnit.java:905)
>    at 
> org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:627)
>    at groovy.lang.GroovyClassLoader.doParseClass(GroovyClassLoader.java:389)
>    at 
> groovy.lang.GroovyClassLoader.lambda$parseClass$3(GroovyClassLoader.java:332)
>    at 
> org.codehaus.groovy.runtime.memoize.StampedCommonCache.compute(StampedCommonCache.java:163)
>    at 
> org.codehaus.groovy.runtime.memoize.StampedCommonCache.getAndPut(StampedCommonCache.java:154)
>    at groovy.lang.GroovyClassLoader.parseClass(GroovyClassLoader.java:330)
>    at groovy.lang.GroovyShell.parseClass(GroovyShell.java:526)
>    at groovy.lang.GroovyShell.parse(GroovyShell.java:538)
>    at groovy.lang.GroovyShell.evaluate(GroovyShell.java:426)
>    at groovy.lang.GroovyShell.evaluate(GroovyShell.java:461)
>    at groovy.lang.GroovyShell.evaluate(GroovyShell.java:436)
>    at 
> org.apache.maven.shared.scriptinterpreter.GroovyScriptInterpreter.evaluateScript(GroovyScriptInterpreter.java:76)
>    at 
> org.apache.maven.shared.scriptinterpreter.ScriptRunner.executeRun(ScriptRunner.java:236)
>    at 
> org.apache.maven.shared.scriptinterpreter.ScriptRunner.run(ScriptRunner.java:161)
>    at 
> org.apache.maven.plugins.invoker.AbstractInvokerMojo.runPostBuildHook(AbstractInvokerMojo.java:2154)
>    at 
> org.apache.maven.plugins.invoker.AbstractInvokerMojo.runBuild(AbstractInvokerMojo.java:2129)
>    at 
> org.apache.maven.plugins.invoker.AbstractInvokerMojo.runBuild(AbstractInvokerMojo.java:1721)
>    at 
> org.apache.maven.plugins.invoker.AbstractInvokerMojo.lambda$runBuilds$4(AbstractInvokerMojo.java:1431)
>    at 
> org.apache.maven.plugins.invoker.JobExecutor.lambda$null$1(JobExecutor.java:69)
>    at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:317)
>    at 
> java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
>    at 
> java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
>    at java.base/java.lang.Thread.run(Thread.java:1589)
> Caused by: java.lang.IllegalArgumentException: Unsupported class file major 
> version 63
>    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:81)
>    at 
> org.codehaus.groovy.control.ClassNodeResolver.findDecompiled(ClassNodeResolver.java:251)
>    at 
> org.codehaus.groovy.control.ClassNodeResolver.tryAsLoaderClassOrScript(ClassNodeResolver.java:189)
>    at 
> org.codehaus.groovy.control.ClassNodeResolver.findClassNode(ClassNodeResolver.java:169)
>    at 
> org.codehaus.groovy.control.ClassNodeResolver.resolveName(ClassNodeResolver.java:125)
>    at 
> org.codehaus.groovy.control.ResolveVisitor.resolveToOuter(ResolveVisitor.java:869){code}
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to