nutzam / nutzboot-maven-plugin

2 stars 4 forks source link

貌似现在不支持java 10 的打包? #2

Closed ywjno closed 6 years ago

ywjno commented 6 years ago

把 maven-compiler-plugin 的 source 跟 target 都改成 1.10,运行打包命令 mvn clean package nutzboot:shade 出现如下错误

[INFO] bad class file? D:\tmp\demo\target\classes\org\nutz\demo\module\TimeModule.class
java.lang.IllegalArgumentException
    at org.objectweb.asm.ClassReader.<init> (Unknown Source)
    at org.objectweb.asm.ClassReader.<init> (Unknown Source)
    at org.objectweb.asm.ClassReader.<init> (Unknown Source)
    at org.nutz.boot.maven.AbstractNbMojo$1.visit (AbstractNbMojo.java:40)
    at org.nutz.lang.util.Disks.visitFile (Disks.java:37)
    at org.nutz.lang.util.Disks.visitFile (Disks.java:43)
    at org.nutz.lang.util.Disks.visitFile (Disks.java:43)
    at org.nutz.lang.util.Disks.visitFile (Disks.java:43)
    at org.nutz.lang.util.Disks.visitFile (Disks.java:43)
    at org.nutz.lang.util.Disks.visitFile (Disks.java:43)
    at org.nutz.lang.util.Disks.visitFile (Disks.java:43)
    at org.nutz.boot.maven.AbstractNbMojo.searchMainClass (AbstractNbMojo.java:37)
    at org.nutz.boot.maven.NbShadeMojo.execute (NbShadeMojo.java:68)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:208)
    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:56)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
    at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
    at org.apache.maven.cli.MavenCli.execute (MavenCli.java:956)
    at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:290)
    at org.apache.maven.cli.MavenCli.main (MavenCli.java:194)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
    at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke (Method.java:564)
    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)

然而在最后还给我提示 BUILD SUCCESS ??

wendal commented 6 years ago

看上去是asm版本不支持jdk10的样子

wendal commented 6 years ago

http://asm.ow2.io/versions.html

wendal commented 6 years ago

使用6.1.1了