Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
3.0-alpha-1
-
None
Description
Running "mvn validate" on the attached POM delivers:
java.lang.NullPointerException at org.apache.maven.cli.CLIReportingUtils.handleLifecycleExecutionException(CLIReportingUtils.java:270) at org.apache.maven.cli.CLIReportingUtils.buildErrorMessage(CLIReportingUtils.java:217) at org.apache.maven.cli.CLIReportingUtils.showError(CLIReportingUtils.java:162) at org.apache.maven.cli.CLIReportingUtils.showError(CLIReportingUtils.java:138) at org.apache.maven.cli.CLIReportingUtils.logResult(CLIReportingUtils.java:80) at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:171) at org.apache.maven.cli.MavenCli.main(MavenCli.java:63) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) 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:408) at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:351) at org.codehaus.classworlds.Launcher.main(Launcher.java:31)
While the POM is indeed invalid, the original error message doesn't make it to the user.
The LifecycleExecutionException to report has no project instance. In this particular case, the exception is created in DefaultLifecycleExecutor by wrapping a LifecycleSpecificationException. This raises the question whether the class LifecycleException should provide a field to carry a MavenProject instance, which could then be propagated to the wrapping exception.
Attachments
Attachments
Issue Links
- is related to
-
MNG-3919 NPE in DefaultLifecycleBindingManager
- Closed