Description
Step to reproduce:
- clone BookKeeper repository from GitHub
- checkout master (or at least commit ecbb053e6e873859507e247cae727f4bc8b9f7fa)
- mvn clean install -DskipTests -X
The fix is to upgrade the shade plugin to the latest version (2.4.3)
this is the error
[INFO] Excluding log4j:log4j:jar:1.2.15 from the shaded jar. [INFO] Minimizing jar org.apache.bookkeeper:bookkeeper-server:jar:4.5.0-SNAPSHOT [INFO] ------------------------------------------------------------------------ [INFO] Reactor Summary: [INFO] [INFO] bookkeeper ......................................... SUCCESS [ 0.428 s] [INFO] compability dependencies ........................... SUCCESS [ 0.016 s] [INFO] bookkeeper-server-compat400 ........................ SUCCESS [ 2.772 s] [INFO] bookkeeper-server-compat410 ........................ SUCCESS [ 1.159 s] [INFO] bookkeeper-server-compat420 ........................ SUCCESS [ 1.370 s] [INFO] Stats API for bookkeeper ........................... SUCCESS [ 0.422 s] [INFO] bookkeeper-server .................................. FAILURE [ 4.002 s] [INFO] bookkeeper-benchmark ............................... SKIPPED [INFO] Stats provider for twitter-stats package ........... SKIPPED [INFO] Stats provider for twitter-ostrich package ......... SKIPPED [INFO] Stats provider for codahale metrics ................ SKIPPED [INFO] bookkeeper-stats-providers ......................... SKIPPED [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 10.328 s [INFO] Finished at: 2016-12-16T17:06:08+01:00 [INFO] Final Memory: 46M/998M [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.apache.maven.plugins:maven-shade-plugin:2.1:shade (default) on project bookkeeper-server: Error creating shaded jar: 46848 -> [Help 1] org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-shade-plugin:2.1:shade (default) on project bookkeeper-server: Error creating shaded jar: 46848 at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:212) 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:128) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106) at org.apache.maven.cli.MavenCli.execute(MavenCli.java:863) at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288) at org.apache.maven.cli.MavenCli.main(MavenCli.java:199) 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:498) 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: 46848 at org.apache.maven.plugins.shade.mojo.ShadeMojo.execute(ShadeMojo.java:528) at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:207) ... 20 more Caused by: java.lang.ArrayIndexOutOfBoundsException: 46848 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.vafer.jdependency.Clazzpath.addClazzpathUnit(Clazzpath.java:94) at org.apache.maven.plugins.shade.filter.MinijarFilter.<init>(MinijarFilter.java:77) at org.apache.maven.plugins.shade.mojo.ShadeMojo.getFilters(ShadeMojo.java:767) at org.apache.maven.plugins.shade.mojo.ShadeMojo.execute(ShadeMojo.java:445) ... 22 more
Attachments
Issue Links
- links to