You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Benjamin Bentmann (JIRA)" <ji...@codehaus.org> on 2008/12/16 20:09:19 UTC

[jira] Created: (MNG-3918) NPE in CLIReportingUtils

NPE in CLIReportingUtils
------------------------

                 Key: MNG-3918
                 URL: http://jira.codehaus.org/browse/MNG-3918
             Project: Maven 2
          Issue Type: Bug
          Components: Errors
    Affects Versions: 3.0-alpha-1
            Reporter: Benjamin Bentmann
            Priority: Minor
         Attachments: pom.xml

Running "mvn validate" on the attached POM delivers:
{noformat}
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)
{noformat}
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.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (MNG-3918) NPE in CLIReportingUtils

Posted by "Shane Isbell (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MNG-3918?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Shane Isbell updated MNG-3918:
------------------------------

    Fix Version/s:     (was: 3.0-alpha-4)
                   3.0-alpha-3

> NPE in CLIReportingUtils
> ------------------------
>
>                 Key: MNG-3918
>                 URL: http://jira.codehaus.org/browse/MNG-3918
>             Project: Maven 2
>          Issue Type: Bug
>          Components: Errors
>    Affects Versions: 3.0-alpha-1
>            Reporter: Benjamin Bentmann
>            Assignee: Shane Isbell
>            Priority: Minor
>             Fix For: 3.0-alpha-3
>
>         Attachments: pom.xml
>
>
> Running "mvn validate" on the attached POM delivers:
> {noformat}
> 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)
> {noformat}
> 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.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (MNG-3918) NPE in CLIReportingUtils

Posted by "Jason van Zyl (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MNG-3918?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jason van Zyl updated MNG-3918:
-------------------------------

    Fix Version/s:     (was: 3.0-alpha-3)
                   3.0-alpha-4

> NPE in CLIReportingUtils
> ------------------------
>
>                 Key: MNG-3918
>                 URL: http://jira.codehaus.org/browse/MNG-3918
>             Project: Maven 2
>          Issue Type: Bug
>          Components: Errors
>    Affects Versions: 3.0-alpha-1
>            Reporter: Benjamin Bentmann
>            Priority: Minor
>             Fix For: 3.0-alpha-4
>
>         Attachments: pom.xml
>
>
> Running "mvn validate" on the attached POM delivers:
> {noformat}
> 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)
> {noformat}
> 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.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Closed: (MNG-3918) NPE in CLIReportingUtils

Posted by "Shane Isbell (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MNG-3918?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Shane Isbell closed MNG-3918.
-----------------------------

    Resolution: Fixed

Fixed this problem with the commit for MNG-3919

> NPE in CLIReportingUtils
> ------------------------
>
>                 Key: MNG-3918
>                 URL: http://jira.codehaus.org/browse/MNG-3918
>             Project: Maven 2
>          Issue Type: Bug
>          Components: Errors
>    Affects Versions: 3.0-alpha-1
>            Reporter: Benjamin Bentmann
>            Assignee: Shane Isbell
>            Priority: Minor
>             Fix For: 3.0-alpha-3
>
>         Attachments: pom.xml
>
>
> Running "mvn validate" on the attached POM delivers:
> {noformat}
> 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)
> {noformat}
> 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.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (MNG-3918) NPE in CLIReportingUtils

Posted by "Brett Porter (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MNG-3918?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Brett Porter updated MNG-3918:
------------------------------

    Fix Version/s: 3.0-alpha-3

> NPE in CLIReportingUtils
> ------------------------
>
>                 Key: MNG-3918
>                 URL: http://jira.codehaus.org/browse/MNG-3918
>             Project: Maven 2
>          Issue Type: Bug
>          Components: Errors
>    Affects Versions: 3.0-alpha-1
>            Reporter: Benjamin Bentmann
>            Priority: Minor
>             Fix For: 3.0-alpha-3
>
>         Attachments: pom.xml
>
>
> Running "mvn validate" on the attached POM delivers:
> {noformat}
> 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)
> {noformat}
> 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.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira