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

ASF GitHub Bot commented on MPLUGIN-336:
----------------------------------------

docrjp commented on issue #14: [MPLUGIN-336] Upgrade ASM to 6.2 for Java 10,11 
support
URL: https://github.com/apache/maven-plugin-tools/pull/14#issuecomment-416643028
 
 
   @rfscholte indeed but it's not about experimenting with ASM or doing 
releases on demand. Rather it is Maven blocking projects from using Java 
release candidates.
   
   Most Maven users won't be working with ASM directly, and different Maven 
plugins as well as runtime can use different ASM versions anyway, so I don't 
think there are really any issues nor expectations there.
   
   It's also probably not that big a deal. I would think that any read-only use 
of ASM (i.e. ClassReader but not ClassWriter) would only need to enable the 
appropriate experimental opcode, and we're done. Certainly, that is all Jacoco 
and Cglib had to do. In fact, cglib provides a way to configure it:
   
   
https://github.com/cglib/cglib/commit/fd9f5021c94250baf8f2701576cc8db1a500908e
   
   I think something of this kind would solve most use cases, and I'm happy to 
help bring that about. But, we would want to design a solution first that is 
sustainable, so I can't just submit some patch requests. We need to 
collectively come to a solution. If we made it configurable, how would that 
look? Could ASM provide a stable ASM_EXPERIMENTAL constant so that Maven 
doesn't have to change every time ASM updates the constant? This isn't about 
JDK 11 but every Java version going forward and how ASM and Maven prepare for 
them. That's got to be worth addressing with a solid solution which we all buy 
into.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> broken in JDK 10 - IllegalArgumentException
> -------------------------------------------
>
>                 Key: MPLUGIN-336
>                 URL: https://issues.apache.org/jira/browse/MPLUGIN-336
>             Project: Maven Plugin Tools
>          Issue Type: Bug
>          Components: Plugin Plugin
>    Affects Versions: 3.5.1
>         Environment: Apache Maven 3.5.0 
> (ff8f5e7444045639af65f6095c62210b5713f426; 2017-04-03T14:39:06-05:00)
> Maven home: /mnt/STORAGE/Work/VetsEZ/Maven/apache-maven-3.5.0
> Java version: 10.0.1, vendor: Oracle Corporation
> Java home: /opt/java/jdk-10.0.1
>            Reporter: Dan Armbrust
>            Priority: Blocker
>
> I'm attempting to migrate some code to Java 10, and this is happening:
> {code:java}
> // 
> [ERROR] Failed to execute goal 
> org.apache.maven.plugins:maven-plugin-plugin:3.5.1:descriptor 
> (default-descriptor) on project mojo: Execution default-descriptor of goal 
> org.apache.maven.plugins:maven-plugin-plugin:3.5.1:descriptor failed.: 
> IllegalArgumentException -> [Help 1]
> org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute 
> goal org.apache.maven.plugins:maven-plugin-plugin:3.5.1:descriptor 
> (default-descriptor) on project mojo: Execution default-descriptor of goal 
> org.apache.maven.plugins:maven-plugin-plugin:3.5.1:descriptor failed.
>         at 
> org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:213)
>         at 
> org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:154)
>         at 
> org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:146)
>         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:51)
>         at 
> org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
>         at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:309)
>         at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:194)
>         at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:107)
>         at org.apache.maven.cli.MavenCli.execute(MavenCli.java:993)
>         at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:345)
>         at org.apache.maven.cli.MavenCli.main(MavenCli.java:191)
>         at 
> java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at 
> java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
>         at 
> java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>         at java.base/java.lang.reflect.Method.invoke(Method.java:564)
>         at 
> org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
>         at 
> org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
>         at 
> org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
>         at 
> org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
> Caused by: org.apache.maven.plugin.PluginExecutionException: Execution 
> default-descriptor of goal 
> org.apache.maven.plugins:maven-plugin-plugin:3.5.1:descriptor failed.
>         at 
> org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:145)
>         at 
> org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
>         ... 20 more
> Caused by: java.lang.IllegalArgumentException
>         at org.objectweb.asm.ClassReader.<init>(Unknown Source)
>         at org.objectweb.asm.ClassReader.<init>(Unknown Source)
>         at org.objectweb.asm.ClassReader.<init>(Unknown Source)
>         at 
> org.apache.maven.tools.plugin.extractor.annotations.scanner.DefaultMojoAnnotationsScanner.analyzeClassStream(DefaultMojoAnnotationsScanner.java:218)
>         at 
> org.apache.maven.tools.plugin.extractor.annotations.scanner.DefaultMojoAnnotationsScanner.scanArchive(DefaultMojoAnnotationsScanner.java:145)
>         at 
> org.apache.maven.tools.plugin.extractor.annotations.scanner.DefaultMojoAnnotationsScanner.scan(DefaultMojoAnnotationsScanner.java:112)
>         at 
> org.apache.maven.tools.plugin.extractor.annotations.scanner.DefaultMojoAnnotationsScanner.scan(DefaultMojoAnnotationsScanner.java:79)
>         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:259)
>         at 
> org.apache.maven.plugin.plugin.DescriptorGeneratorMojo.execute(DescriptorGeneratorMojo.java:90)
>         at 
> org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
>         ... 21 more
> {code}
> so, apparently, the asm classReader is broken (again) - and this plugin has a 
> fatal error that breaks the world, instead of doing the reasonable thing, and 
> logging an error, and continuing on with the build.
>  
> In this particular case, it is scanning a class that shouldn't even be 
> scanned, as it has no mojo annotations to find, yet, the "mojoDependency" 
> parameter doesn't seem to do anything useful, as I can't get it to stop 
> scanning this class.
>  
> This is the class that trips it up:
> [https://github.com/OSEHRA/ISAAC/blob/bce62e1e4879853fd6b96f4f77d5a2b48289ee27/core/model/src/main/java/sh/isaac/model/coordinate/LogicCoordinateLazyBinding.java]
> This class is scanned successfully (I assume) when I try the maven build with 
> JDK 9 or JDK 8. 
> JDK10 must have a change that isn't yet supported?
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to