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

Robert Scholte closed MPLUGIN-276.
----------------------------------

    Resolution: Duplicate
      Assignee: Robert Scholte

> Cant write lambdas in maven plugin development.
> -----------------------------------------------
>
>                 Key: MPLUGIN-276
>                 URL: https://jira.codehaus.org/browse/MPLUGIN-276
>             Project: Maven Plugin Tools
>          Issue Type: Bug
>          Components: Plugin Plugin
>    Affects Versions: 3.2
>         Environment: Java 8
> Maven 3.2.3
>            Reporter: david limkys
>            Assignee: Robert Scholte
>            Priority: Critical
>
> When trying to compile a maven plugin that has a lambda expression used in it 
> you get the following error:
> {noformat}
> c:\devl\work\ofx-maven-plugin>
> c:\devl\work\ofx-maven-plugin>
> c:\devl\work\ofx-maven-plugin>mvn install -e
> [INFO] Error stacktraces are turned on.
> [INFO] Scanning for projects...
> [INFO]
> [INFO] 
> ------------------------------------------------------------------------
> [INFO] Building ofx-maven-plugin 1.0-SNAPSHOT
> [INFO] 
> ------------------------------------------------------------------------
> [INFO]
> [INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ 
> ofx-maven-plugin ---
> [WARNING] Using platform encoding (Cp1255 actually) to copy filtered 
> resources, i.e. build is platform dependent!
> [INFO] skip non existing resourceDirectory 
> c:\devl\work\ofx-maven-plugin\src\main\resources
> [INFO]
> [INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ 
> ofx-maven-plugin ---
> [INFO] Nothing to compile - all classes are up to date
> [INFO]
> [INFO] --- maven-plugin-plugin:3.2:descriptor (default-descriptor) @ 
> ofx-maven-plugin ---
> [WARNING] Using platform encoding (Cp1255 actually) to read mojo metadata, 
> i.e. build is platform dependent!
> [INFO] Applying mojo extractor for language: java
> [INFO] Mojo extractor for language: java found 0 mojo descriptors.
> [INFO] Applying mojo extractor for language: bsh
> [INFO] Mojo extractor for language: bsh found 0 mojo descriptors.
> [INFO] Applying mojo extractor for language: java-annotations
> [INFO] 
> ------------------------------------------------------------------------
> [INFO] BUILD FAILURE
> [INFO] 
> ------------------------------------------------------------------------
> [INFO] Total time: 1.565 s
> [INFO] Finished at: 2014-10-18T14:37:45+03:00
> [INFO] Final Memory: 8M/20M
> [INFO] 
> ------------------------------------------------------------------------
> [ERROR] Failed to execute goal 
> org.apache.maven.plugins:maven-plugin-plugin:3.2:descriptor 
> (default-descriptor) on project ofx-maven-plugin: Execution 
> default-descriptor of goal 
> org.apache.maven.plugins:maven-plugin-plugin:3.2:descriptor failed: 52264 -> 
> [Help 1]
> org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute 
> goal org.apache.maven.plugins:maven-plugin-plugin:3.2:descriptor 
> (default-descriptor) on project ofx-maven-plugin: Execution 
> default-descriptor of goal 
> org.apache.maven.plugins:maven-plugin-plugin:3.2:descriptor failed: 52264
>         at 
> org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:224)
>         at 
> org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
>         at 
> org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
>         at 
> org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
>         at 
> org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
>         at 
> org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
>         at 
> org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:120)
>         at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:347)
>         at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:154)
>         at org.apache.maven.cli.MavenCli.execute(MavenCli.java:582)
>         at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:214)
>         at org.apache.maven.cli.MavenCli.main(MavenCli.java:158)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
>         at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>         at java.lang.reflect.Method.invoke(Method.java:483)
>         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.2:descriptor failed: 52264
>         at 
> org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:143)
>         at 
> org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
>         ... 19 more
> Caused by: java.lang.ArrayIndexOutOfBoundsException: 52264
>         at org.objectweb.asm.ClassReader.readClass(Unknown Source)
>         at org.objectweb.asm.ClassReader.accept(Unknown Source)
>         at org.objectweb.asm.ClassReader.accept(Unknown Source)
>         at 
> org.apache.maven.tools.plugin.annotations.scanner.DefaultMojoAnnotationsScanner.scanDirectory(DefaultMojoAnnotationsScanner.java:205)
>         at 
> org.apache.maven.tools.plugin.annotations.scanner.DefaultMojoAnnotationsScanner.scan(DefaultMojoAnnotationsScanner.java:95)
>         at 
> org.apache.maven.tools.plugin.annotations.JavaAnnotationsMojoDescriptorExtractor.scanAnnotations(JavaAnnotationsMojoDescriptorExtractor.java:125)
>         at 
> org.apache.maven.tools.plugin.annotations.JavaAnnotationsMojoDescriptorExtractor.execute(JavaAnnotationsMojoDescriptorExtractor.java:104)
>         at 
> org.apache.maven.tools.plugin.scanner.DefaultMojoScanner.populatePluginDescriptor(DefaultMojoScanner.java:108)
>         at 
> org.apache.maven.plugin.plugin.AbstractGeneratorMojo.execute(AbstractGeneratorMojo.java:233)
>         at 
> org.apache.maven.plugin.plugin.DescriptorGeneratorMojo.execute(DescriptorGeneratorMojo.java:92)
>         at 
> org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:132)
>         ... 20 more
> [ERROR]
> [ERROR] Re-run Maven using the -X switch to enable full debug logging.
> [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
> {noformat}
> Converting to an abstract class solves this issue.



--
This message was sent by Atlassian JIRA
(v6.1.6#6162)

Reply via email to