You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Ivica Loncar (JIRA)" <ji...@codehaus.org> on 2010/04/27 11:28:12 UTC

[jira] Created: (MNG-4648) Aa a user I would like to see better error reporting from DefaultPluginRealmCache#pluginHashCode method

Aa a user I would like to see better error reporting from DefaultPluginRealmCache#pluginHashCode method
-------------------------------------------------------------------------------------------------------

                 Key: MNG-4648
                 URL: http://jira.codehaus.org/browse/MNG-4648
             Project: Maven 2 & 3
          Issue Type: Improvement
          Components: Settings
            Reporter: Ivica Loncar
            Priority: Minor


As a user i would like to see better error reporting from DefaultPluginRealmCache#pluginHashCode method

Currently it calculates hash value based on a dependency metadata, but if I omit version it fails with NullPointer exception.

It would be more user friendly to validate metadata prior to calculating hash value and to display more meaningful error to the end user.

Test scenario:
 - configure plugin and create dependencies
 - add dependency but DO NOT specify version
 - run maven such that plugin is invoked
maven will fail without reporting which dependency doesn't have version

-- 
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-4648) NullPointerException thrown from DefaultPluginRealmCache#pluginHashCode method if project-level plugin dependency misses version

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

Benjamin Bentmann updated MNG-4648:
-----------------------------------

          Component/s:     (was: Settings)
                       POM
                       Plugins and Lifecycle
             Priority: Major  (was: Minor)
    Affects Version/s: 3.0-beta-1
           Issue Type: Bug  (was: Improvement)
              Summary: NullPointerException thrown from DefaultPluginRealmCache#pluginHashCode method if project-level plugin dependency misses version  (was: Aa a user I would like to see better error reporting from DefaultPluginRealmCache#pluginHashCode method)

{noformat}
[ERROR] NullPointerException
java.lang.NullPointerException
        at org.apache.maven.plugin.DefaultPluginRealmCache.pluginHashCode(DefaultPluginRealmCache.java:161)
        at org.apache.maven.plugin.DefaultPluginRealmCache$CacheKey.<init>(DefaultPluginRealmCache.java:73)
        at org.apache.maven.plugin.DefaultPluginRealmCache.get(DefaultPluginRealmCache.java:114)
        at org.apache.maven.plugin.internal.DefaultMavenPluginManager.setupPluginRealm(DefaultMavenPluginManager.java:261)
        at org.apache.maven.plugin.DefaultBuildPluginManager.getPluginRealm(DefaultBuildPluginManager.java:184)
        at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:80)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:133)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:77)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:69)
        at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:82)
        at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:54)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.singleThreadedBuild(DefaultLifecycleExecutor.java:218)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:190)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:246)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:95)
        at org.apache.maven.cli.MavenCli.execute(MavenCli.java:430)
        at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:160)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:124)
{noformat}
we can safely call this a bug...

> NullPointerException thrown from DefaultPluginRealmCache#pluginHashCode method if project-level plugin dependency misses version
> --------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: MNG-4648
>                 URL: http://jira.codehaus.org/browse/MNG-4648
>             Project: Maven 2 & 3
>          Issue Type: Bug
>          Components: Plugins and Lifecycle, POM
>    Affects Versions: 3.0-beta-1
>            Reporter: Ivica Loncar
>
> As a user i would like to see better error reporting from DefaultPluginRealmCache#pluginHashCode method
> Currently it calculates hash value based on a dependency metadata, but if I omit version it fails with NullPointer exception.
> It would be more user friendly to validate metadata prior to calculating hash value and to display more meaningful error to the end user.
> Test scenario:
>  - configure plugin and create dependencies
>  - add dependency but DO NOT specify version
>  - run maven such that plugin is invoked
> maven will fail without reporting which dependency doesn't have version

-- 
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-4648) NullPointerException thrown from DefaultPluginRealmCache#pluginHashCode method if project-level plugin dependency misses version

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

Benjamin Bentmann closed MNG-4648.
----------------------------------

       Resolution: Fixed
    Fix Version/s: 3.0-beta-2
         Assignee: Benjamin Bentmann

Fixed in [r938410|http://svn.apache.org/viewvc?view=revision&revision=938410].

> NullPointerException thrown from DefaultPluginRealmCache#pluginHashCode method if project-level plugin dependency misses version
> --------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: MNG-4648
>                 URL: http://jira.codehaus.org/browse/MNG-4648
>             Project: Maven 2 & 3
>          Issue Type: Bug
>          Components: Plugins and Lifecycle, POM
>    Affects Versions: 3.0-beta-1
>            Reporter: Ivica Loncar
>            Assignee: Benjamin Bentmann
>             Fix For: 3.0-beta-2
>
>
> As a user i would like to see better error reporting from DefaultPluginRealmCache#pluginHashCode method
> Currently it calculates hash value based on a dependency metadata, but if I omit version it fails with NullPointer exception.
> It would be more user friendly to validate metadata prior to calculating hash value and to display more meaningful error to the end user.
> Test scenario:
>  - configure plugin and create dependencies
>  - add dependency but DO NOT specify version
>  - run maven such that plugin is invoked
> maven will fail without reporting which dependency doesn't have version

-- 
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