Uploaded image for project: 'Nuxeo Platform'
  1. Nuxeo Platform
  2. NXP-18655

Maven shade plugin should support Java 8

    XMLWordPrintable

    Details

      Description

      When shading the launcher, I've got the following errors while processing the new service monitor class. Problem comes from that the 2.2. version of the shade plugin does not support java 1.8 (see MSHADE-166). So we're going to upgade the plugin up to the last 2.4.2 which includes the fix.

      [ERROR] Failed to execute goal org.apache.maven.plugins:maven-shade-plugin:2.2:shade (default) on project nuxeo-launcher: Error creating shaded jar: Error in ASM processing class org/nuxeo/runtime/api/ServicePassivator$Waiter.class: 26415 -> [Help 1]
      org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-shade-plugin:2.2:shade (default) on project nuxeo-launcher: Error creating shaded jar: Error in ASM processing class org/nuxeo/runtime/api/ServicePassivator$Waiter.class
      	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:216)
      	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:355)
      	at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:155)
      	at org.apache.maven.cli.MavenCli.execute(MavenCli.java:584)
      	at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:216)
      	at org.apache.maven.cli.MavenCli.main(MavenCli.java:160)
      	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:497)
      	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.MojoExecutionException: Error creating shaded jar: Error in ASM processing class org/nuxeo/runtime/api/ServicePassivator$Waiter.class
      	at org.apache.maven.plugins.shade.mojo.ShadeMojo.execute(ShadeMojo.java:567)
      	at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:132)
      	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
      	... 19 more
      Caused by: org.apache.maven.plugin.MojoExecutionException: Error in ASM processing class org/nuxeo/runtime/api/ServicePassivator$Waiter.class
      	at org.apache.maven.plugins.shade.DefaultShader.addRemappedClass(DefaultShader.java:346)
      	at org.apache.maven.plugins.shade.DefaultShader.shade(DefaultShader.java:164)
      	at org.apache.maven.plugins.shade.mojo.ShadeMojo.execute(ShadeMojo.java:472)
      	... 21 more
      Caused by: java.lang.ArrayIndexOutOfBoundsException: 26415
      	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.plugins.shade.DefaultShader.addRemappedClass(DefaultShader.java:342)
      	... 23 more
      [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/MojoExecutionException
      

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: