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

[jira] Closed: (MDEP-149) Field accesses and method invocations cause bogus dependencies

     [ http://jira.codehaus.org/browse/MDEP-149?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Brian Fox closed MDEP-149.
--------------------------

       Resolution: Fixed
    Fix Version/s: 2.2

> Field accesses and method invocations cause bogus dependencies
> --------------------------------------------------------------
>
>                 Key: MDEP-149
>                 URL: http://jira.codehaus.org/browse/MDEP-149
>             Project: Maven 2.x Dependency Plugin
>          Issue Type: Bug
>          Components: analyze
>    Affects Versions: 2.0
>            Reporter: Benjamin Bentmann
>            Assignee: Brian Fox
>            Priority: Trivial
>             Fix For: 2.2
>
>         Attachments: bogus-dependencies.patch, MDEP-149.zip
>
>
> When hunting down some "Used undeclared dependencies" warnings, I found the plugin lying. For example, the line
> {code:java}
> java.lang.Object var = bean.field;
> {code}
> does not impose a direct dependency on the field's type, whatever it may be. Likewise, the line
> {code:java}
> bean.method(null);
> {code}
> does not directly depend on the method's return type nor parameter types. Unless I explicitly code a reference to a type by means of variable declarations, type checks/casts etc., there is no need to declare dependencies that are already brought in via transitivity, that's what Maven was invented for, isn't is ;-)

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