Plugin not compatible with java 20
fvanhovell-ing opened this issue · 2 comments
fvanhovell-ing commented
Similar to previous issue #30, plugin com.github.giuliopulina:swagger-validator-maven-plugin:1.2.6-giuliopulina
does not run with JDK 20:
[ERROR] BUG! exception in phase 'semantic analysis' in source unit '[snipped-path]/[snipped-filename].groovy' Unsupported class file major version 64 -> [Help 1]
org.codehaus.groovy.GroovyBugError: BUG! exception in phase 'semantic analysis' in source unit '[snipped-path]/[snipped-filename].groovy' Unsupported class file major version 64
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:470)
at org.springframework.cloud.contract.verifier.util.ContractVerifierDslConverter.toObject(ContractVerifierDslConverter.java:169)
at org.springframework.cloud.contract.verifier.util.ContractVerifierDslConverter.convertAsCollection(ContractVerifierDslConverter.java:116)
at org.springframework.cloud.contract.verifier.file.ContractFileScanner.appendRecursively(ContractFileScanner.java:265)
at org.springframework.cloud.contract.verifier.file.ContractFileScanner.addContractToTestGeneration(ContractFileScanner.java:311)
at org.springframework.cloud.contract.verifier.file.ContractFileScanner.appendRecursively(ContractFileScanner.java:268)
at org.springframework.cloud.contract.verifier.file.ContractFileScanner.findContractsRecursively(ContractFileScanner.java:237)
at org.springframework.cloud.contract.verifier.converter.RecursiveFilesConverter.processFiles(RecursiveFilesConverter.java:85)
at org.springframework.cloud.contract.maven.verifier.ConvertMojo.execute(ConvertMojo.java:234)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:137)
at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute2(MojoExecutor.java:370)
at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute(MojoExecutor.java:351)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:215)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:171)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:163)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:117)
at org.mvndaemon.mvnd.builder.SmartBuilderImpl.buildProject(SmartBuilderImpl.java:190)
at org.mvndaemon.mvnd.builder.SmartBuilderImpl$ProjectBuildTask.run(SmartBuilderImpl.java:208)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:577)
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:1623)
Caused by: java.lang.IllegalArgumentException: Unsupported class file major version 64
at groovyjarjarasm.asm.ClassReader.<init>(ClassReader.java:199)
at groovyjarjarasm.asm.ClassReader.<init>(ClassReader.java:180)
... snip lines ....
... 32 common frames omitted
giuliopulina commented
@fvanhovell-ing could you please provide a sample project that reproduces the error?
I have created a simple project that use JDK 20 and run with the plugin version you mentioned (com.github.giuliopulina:swagger-validator-maven-plugin:1.2.6-giuliopulina) but I cannot reproduce it.
giuliopulina commented
@fvanhovell-ing I think the most likely thing is that Groovy doesn't support JDK 20 yet (latest published release notes for 4.0.2 speaks about "preliminary support for JDK 19")