-
Notifications
You must be signed in to change notification settings - Fork 21
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
groovy-maven-plugin:2.1.1 not working with java 17 #28
Comments
Hi we are facing the same problem. |
Hi, will there be a java 17 release in the near future? |
The stack here suggests its the Groovy runtime that isn't supporting the newer bytecode, is there a problem including a newer Groovy version by GMaven? |
any updates on this? or workarounds...impacting a migration to java 17 on my end |
I could use an example project showing this failure. Locally I don't have issues with Java 17 execution of Groovy code via the groovy-maven-plugin. |
I attempted but I'm struggling to reproduce this myself on a new sample project, and unfortunately can't share my entire project/library setup. I might deprioritize this given other stuff on my plate, sorry wish I was more help here |
I solved the issue with adding dependency of groovy to gmaven instead of using gmaven version
TO
|
Exception in thread "main" BUG! exception in phase 'semantic analysis' in source unit 'script1.groovy' Unsupported class file major version 61 at org.codehaus.groovy.control.CompilationUnit$ISourceUnitOperation.doPhaseOperation(CompilationUnit.java:884) at org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:623) 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 org.codehaus.gmaven.adapter.impl.ScriptExecutorImpl.execute(ScriptExecutorImpl.java:83) at org.codehaus.gmaven.plugin.ExecuteMojo.run(ExecuteMojo.java:95) at org.codehaus.gmaven.plugin.MojoSupport.execute(MojoSupport.java:47) at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:137) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:210) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:156) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:148) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:117) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:81) at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:56) at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:305) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:192) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:105) at org.apache.maven.cli.MavenCli.execute(MavenCli.java:957) at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:289) at org.apache.maven.cli.MavenCli.main(MavenCli.java:193) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:568) at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:282) at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:225) at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:406) at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:347) at org.codehaus.classworlds.Launcher.main(Launcher.java:47) Caused by: java.lang.IllegalArgumentException: Unsupported class file major version 61 at groovyjarjarasm.asm.ClassReader.<init>(ClassReader.java:196) at groovyjarjarasm.asm.ClassReader.<init>(ClassReader.java:177) at groovyjarjarasm.asm.ClassReader.<init>(ClassReader.java:163) at groovyjarjarasm.asm.ClassReader.<init>(ClassReader.java:284) 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:874) at org.codehaus.groovy.control.ResolveVisitor.resolve(ResolveVisitor.java:499) at org.codehaus.groovy.control.ResolveVisitor.resolveFromDefaultImports(ResolveVisitor.java:656) at org.codehaus.groovy.control.ResolveVisitor.resolveFromDefaultImports(ResolveVisitor.java:619) at org.codehaus.groovy.control.ResolveVisitor.resolve(ResolveVisitor.java:498) at org.codehaus.groovy.control.ResolveVisitor.resolve(ResolveVisitor.java:461) at org.codehaus.groovy.control.ResolveVisitor.transformVariableExpression(ResolveVisitor.java:1135) at org.codehaus.groovy.control.ResolveVisitor.transform(ResolveVisitor.java:893) at org.codehaus.groovy.control.ResolveVisitor.transformMethodCallExpression(ResolveVisitor.java:1280) at org.codehaus.groovy.control.ResolveVisitor.transform(ResolveVisitor.java:901) at org.codehaus.groovy.control.ResolveVisitor.transformMethodCallExpression(ResolveVisitor.java:1280) at org.codehaus.groovy.control.ResolveVisitor.transform(ResolveVisitor.java:901) at org.codehaus.groovy.control.ResolveVisitor.transformBinaryExpression(ResolveVisitor.java:1214) at org.codehaus.groovy.control.ResolveVisitor.transform(ResolveVisitor.java:899) at org.codehaus.groovy.ast.ClassCodeExpressionTransformer.visitExpressionStatement(ClassCodeExpressionTransformer.java:108) at org.codehaus.groovy.ast.stmt.ExpressionStatement.visit(ExpressionStatement.java:40) at org.codehaus.groovy.ast.CodeVisitorSupport.visitBlockStatement(CodeVisitorSupport.java:86) at org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitBlockStatement(ClassCodeVisitorSupport.java:164) at org.codehaus.groovy.control.ResolveVisitor.visitBlockStatement(ResolveVisitor.java:1569) at org.codehaus.groovy.ast.stmt.BlockStatement.visit(BlockStatement.java:69) at org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitClassCodeContainer(ClassCodeVisitorSupport.java:138) at org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitConstructorOrMethod(ClassCodeVisitorSupport.java:111) at org.codehaus.groovy.ast.ClassCodeExpressionTransformer.visitConstructorOrMethod(ClassCodeExpressionTransformer.java:66) at org.codehaus.groovy.control.ResolveVisitor.visitConstructorOrMethod(ResolveVisitor.java:294) at org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitMethod(ClassCodeVisitorSupport.java:106) at org.codehaus.groovy.ast.ClassNode.visitMethods(ClassNode.java:1100) at org.codehaus.groovy.ast.ClassNode.visitContents(ClassNode.java:1093) at org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitClass(ClassCodeVisitorSupport.java:52) at org.codehaus.groovy.control.ResolveVisitor.visitClass(ResolveVisitor.java:1478) at org.codehaus.groovy.control.ResolveVisitor.startResolving(ResolveVisitor.java:262) at org.codehaus.groovy.control.CompilationUnit.lambda$new$16(CompilationUnit.java:717) at org.codehaus.groovy.control.CompilationUnit$ISourceUnitOperation.doPhaseOperation(CompilationUnit.java:880) ... 35 more
The text was updated successfully, but these errors were encountered: