talios / frege-maven-plugin

Maven Compiler Plugin for the Frege language
4 stars 0 forks source link

NullPointerException when no sources are mentioned in the pom.xml #1

Closed talios closed 11 years ago

talios commented 11 years ago

When no files are mentioned in the plugin configuration, an NPE is generated:

[ERROR] Failed to execute goal com.theoryinpractise.frege:frege-maven-plugin:1.0.3:compile (compile) on project frege-test: Execution compile of goal com.theoryinpractise.frege:frege-maven-plugin:1.0.3:compile failed. NullPointerException -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal com.theoryinpractise.frege:frege-maven-plugin:1.0.3:compile (compile) on project frege-test: Execution compile of goal com.theoryinpractise.frege:frege-maven-plugin:1.0.3:compile failed.
  at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:224)
  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:84)
  at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
  at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
  at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
  at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:317)
  at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:152)
  at org.apache.maven.cli.MavenCli.execute(MavenCli.java:555)
  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: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.PluginExecutionException: Execution compile of goal com.theoryinpractise.frege:frege-maven-plugin:1.0.3:compile failed.
  at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:115)
  at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
  ... 19 more
Caused by: java.lang.NullPointerException
  at com.theoryinpractise.frege.AbstractFregeCompileMojo.execute(AbstractFregeCompileMojo.java:87)
  at com.theoryinpractise.frege.FregeCompileMojo.execute(FregeCompileMojo.java:47)
  at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:106)
  ... 20 more
talios commented 11 years ago

Fixed in 1.0.4 - references are no longer used, sources are automatically discovered.