gpt4 book ai didi

java - 使用 minimizeJar 选项创建着色 jar 时出现 ArrayIndexOutOfBoundsException

转载 作者:行者123 更新时间:2023-12-02 14:10:15 25 4
gpt4 key购买 nike

使用 maven-shade 插件创建着色 jar 时出现错误。我尝试使用 mvnDebug 调试错误,但没有帮助。我的最终目标是最小化 jar 的尺寸。除了minimumJar 之外的任何其他选项也受到欢迎。

提前致谢

Error creating shaded jar: 6952
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: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.MojoExecutionException: Error creating shaded jar: 6952
at org.apache.maven.plugins.shade.mojo.ShadeMojo.execute(ShadeMojo.java:551)
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: java.lang.ArrayIndexOutOfBoundsException: 6952
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:76)
at org.apache.maven.plugins.shade.mojo.ShadeMojo.getFilters(ShadeMojo.java:745)
at org.apache.maven.plugins.shade.mojo.ShadeMojo.execute(ShadeMojo.java:471)
... 21 more

最佳答案

升级您的阴影插件版本。我在2.2版本中遇到了异常,在vresion 3.0.0中解决了它。这是一个issue

关于java - 使用 minimizeJar 选项创建着色 jar 时出现 ArrayIndexOutOfBoundsException,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27592298/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com