lgrignon/jsweet-maven-plugin

NPE exception trying to build against 2.0.0-rc1

Closed this issue · 2 comments

I'm was trying to switch to the latest version of JSweet and the plugin (2.0.0-rc1) to do some testing with the new features and functionality, but am hitting a null pointer exception when doing so. Below is the full stack trace. Let me know if there's anything other info you'd like or things to try. Thanks

failed to create transpiler 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: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: failed to create transpiler at org.jsweet.AbstractJSweetMojo.createJSweetTranspiler(AbstractJSweetMojo.java:291) at org.jsweet.JSweetMojo.execute(JSweetMojo.java:39) 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: java.lang.NullPointerException at org.jsweet.AbstractJSweetMojo.logInfo(AbstractJSweetMojo.java:133) at org.jsweet.AbstractJSweetMojo.getCandiesJars(AbstractJSweetMojo.java:335) at org.jsweet.AbstractJSweetMojo.createJSweetTranspiler(AbstractJSweetMojo.java:172) ... 23 more

Oops. My fault. I think that' because the verbose variable can be null now so we have to check it.
I have released version 2.0.0-rc1u1, which should fix it, and PR'd the fix.
BTW, an easy workaround for version 2.0.0-rc1 would just be to add the verbose option to your pom (true or false).

fixed in 2f6e1fc