[Updated] (MPLUGIN-369) Descriptor generation fails if a Mojo uses Java Records ("UnsupportedOperationException: Record requires ASM8")

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[Updated] (MPLUGIN-369) Descriptor generation fails if a Mojo uses Java Records ("UnsupportedOperationException: Record requires ASM8")

Hudson (Jira)

     [ https://issues.apache.org/jira/browse/MPLUGIN-369?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Sylwester Lachiewicz updated MPLUGIN-369:
-----------------------------------------
    Fix Version/s: 3.6.1

> Descriptor generation fails if a Mojo uses Java Records ("UnsupportedOperationException: Record requires ASM8")
> ---------------------------------------------------------------------------------------------------------------
>
>                 Key: MPLUGIN-369
>                 URL: https://issues.apache.org/jira/browse/MPLUGIN-369
>             Project: Maven Plugin Tools
>          Issue Type: Bug
>          Components: Plugin Plugin
>    Affects Versions: 3.6.0
>            Reporter: Alex Shesterov
>            Assignee: Sylwester Lachiewicz
>            Priority: Major
>             Fix For: 3.6.1
>
>
> If a Mojo uses Java Records, then plugin's descriptor generation fails with the following error: *"descriptor failed: Record requires ASM8"*
> The fix requires upgdating ASM, which is already done in 3.6.1, *and* creating ASM Class Visitors with an updated API flag, e.g.:
> {code:java}
> public MojoClassVisitor( Logger logger )
> {
>     super( Opcodes.ASM9 ); // <-- This is currently set to Opcodes.ASM7
>     this.logger = logger;
> }{code}
> ----
> Error log:
> {code:java}
> [ERROR] Failed to execute goal org.apache.maven.plugins:maven-plugin-plugin:3.6.0:descriptor (default-descriptor) on project ***: Execution default-descriptor of goal org.apache.maven.plugins:maven-plugin-plugin:3.6.0:descriptor failed: Record requires ASM8 -> [Help 1]
> org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-plugin-plugin:3.6.0:descriptor (default-descriptor) on project re-app-classifier-generator-plugin: Execution default-descriptor of goal org.apache.maven.plugins:maven-plugin-plugin:3.6.0:descriptor failed: Record requires ASM8
>     at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:215)
>     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 jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
>     at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:64)
>     at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
>     at java.lang.reflect.Method.invoke (Method.java:564)
>     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)
> Caused by: org.apache.maven.plugin.PluginExecutionException: Execution default-descriptor of goal org.apache.maven.plugins:maven-plugin-plugin:3.6.0:descriptor failed: Record requires ASM8
>     at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:148)
>     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 jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
>     at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:64)
>     at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
>     at java.lang.reflect.Method.invoke (Method.java:564)
>     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)
> Caused by: java.lang.UnsupportedOperationException: Record requires ASM8
>     at org.objectweb.asm.ClassVisitor.visitRecordComponent (ClassVisitor.java:305)
>     at org.objectweb.asm.ClassReader.readRecordComponent (ClassReader.java:920)
>     at org.objectweb.asm.ClassReader.accept (ClassReader.java:698)
>     at org.objectweb.asm.ClassReader.accept (ClassReader.java:394)
>     at org.apache.maven.tools.plugin.extractor.annotations.scanner.DefaultMojoAnnotationsScanner.analyzeClassStream (DefaultMojoAnnotationsScanner.java:208)
>     at org.apache.maven.tools.plugin.extractor.annotations.scanner.DefaultMojoAnnotationsScanner.scanArchive (DefaultMojoAnnotationsScanner.java:142)
>     at org.apache.maven.tools.plugin.extractor.annotations.scanner.DefaultMojoAnnotationsScanner.scan (DefaultMojoAnnotationsScanner.java:111)
>     at org.apache.maven.tools.plugin.extractor.annotations.scanner.DefaultMojoAnnotationsScanner.scan (DefaultMojoAnnotationsScanner.java:78)
>     at org.apache.maven.tools.plugin.extractor.annotations.JavaAnnotationsMojoDescriptorExtractor.scanAnnotations (JavaAnnotationsMojoDescriptorExtractor.java:124)
>     at org.apache.maven.tools.plugin.extractor.annotations.JavaAnnotationsMojoDescriptorExtractor.execute (JavaAnnotationsMojoDescriptorExtractor.java:103)
>     at org.apache.maven.tools.plugin.scanner.DefaultMojoScanner.populatePluginDescriptor (DefaultMojoScanner.java:96)
>     at org.apache.maven.plugin.plugin.AbstractGeneratorMojo.execute (AbstractGeneratorMojo.java:260)
>     at org.apache.maven.plugin.plugin.DescriptorGeneratorMojo.execute (DescriptorGeneratorMojo.java:91)
>     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 jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
>     at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:64)
>     at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
>     at java.lang.reflect.Method.invoke (Method.java:564)
>     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)
> [ERROR]
> [ERROR]
> [ERROR] For more information about the errors and possible solutions, please read the following articles:
> [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginExecutionException {code}
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)