maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ismael Juma (JIRA)" <j...@apache.org>
Subject [jira] [Created] (MSHADE-258) RemappingClassAdapter is deprecated and throws an exception with ASM 6.0 beta
Date Sun, 06 Aug 2017 00:35:00 GMT
Ismael Juma created MSHADE-258:
----------------------------------

             Summary: RemappingClassAdapter is deprecated and throws an exception with ASM
6.0 beta
                 Key: MSHADE-258
                 URL: https://issues.apache.org/jira/browse/MSHADE-258
             Project: Maven Shade Plugin
          Issue Type: Bug
    Affects Versions: 3.0.0
            Reporter: Ismael Juma


While trying to use the maven shade plugin with ASM 6.0 beta (for Java 9 support) in the easymock
project, I ran into the following exception:

{code}
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-shade-plugin:3.0.0:shade (default)
on project easymock: Error creating shaded jar: Error in ASM processing class module-info.class:
RemappingClassAdapter is deprecated, use ClassRemapper instead -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-shade-plugin:3.0.0:shade
(default) on project easymock: Error creating shaded jar: Error in ASM processing class module-info.class
	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 sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:606)
	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 module-info.class
	at org.apache.maven.plugins.shade.mojo.ShadeMojo.execute(ShadeMojo.java:546)
	at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
	... 20 more
Caused by: org.apache.maven.plugin.MojoExecutionException: Error in ASM processing class module-info.class
	at org.apache.maven.plugins.shade.DefaultShader.addRemappedClass(DefaultShader.java:453)
	at org.apache.maven.plugins.shade.DefaultShader.shadeSingleJar(DefaultShader.java:220)
	at org.apache.maven.plugins.shade.DefaultShader.shadeJars(DefaultShader.java:181)
	at org.apache.maven.plugins.shade.DefaultShader.shade(DefaultShader.java:104)
	at org.apache.maven.plugins.shade.mojo.ShadeMojo.execute(ShadeMojo.java:442)
	... 22 more
Caused by: java.lang.RuntimeException: RemappingClassAdapter is deprecated, use ClassRemapper
instead
	at org.objectweb.asm.commons.RemappingClassAdapter.visitModule(Unknown Source)
	at org.objectweb.asm.ClassReader.a(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:449)
{code}

Link to the exception:

https://gitlab.ow2.org/asm/asm/blob/master/src/org/objectweb/asm/commons/RemappingClassAdapter.java#L75

Link to the change that deprecated the class:

https://gitlab.ow2.org/asm/asm/commit/54303379f52c7ea84affbf6142e0f4c4be9127c3



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message