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/02/29 21:25:28 UTC

[jira] Created: (MDEP-150) Indeterministic artifact ordering can cause bogus warnings

Indeterministic artifact ordering can cause bogus warnings
----------------------------------------------------------

                 Key: MDEP-150
                 URL: http://jira.codehaus.org/browse/MDEP-150
             Project: Maven 2.x Dependency Plugin
          Issue Type: Bug
          Components: analyze
    Affects Versions: 2.0
            Reporter: Benjamin Bentmann
            Assignee: Brian Fox
            Priority: Trivial
         Attachments: deterministic-artifact-ordering.patch

Once MNG-1412 gets released, it will be nice to have the dependency analyzer respect ordering, too.

As some motivation, consider a project P with the following dependency tree:
{noformat}
Project P
+- Dep A
   +- Dep B
{noformat}
Further assume that both dependencies a and B contain the same class X (for whatever reason, say backward-compat). Project P directly uses this class X (hence Dep A being a dependency of P). 

Currenlty, the ordering of artifacts is ignored by the analyzer such that the {{artifactClassMap}} might list Dep B before Dep A. This in turn will make {{findArtifactForClassName()}} return Dep B as the source artifact for class X which results in the bogus warning "Used undeclared dependency Dep B" because Dep A should have been considered instead as it is first on the class path.

-- 
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: (MDEP-150) Indeterministic artifact ordering can cause bogus warnings

Posted by "Brian Fox (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MDEP-150?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Brian Fox closed MDEP-150.
--------------------------

       Resolution: Fixed
    Fix Version/s: 2.1

Patch applied thanks. An IT for this would be great.

> Indeterministic artifact ordering can cause bogus warnings
> ----------------------------------------------------------
>
>                 Key: MDEP-150
>                 URL: http://jira.codehaus.org/browse/MDEP-150
>             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.1
>
>         Attachments: deterministic-artifact-ordering.patch
>
>
> Once MNG-1412 gets released, it will be nice to have the dependency analyzer respect ordering, too.
> As some motivation, consider a project P with the following dependency tree:
> {noformat}
> Project P
> +- Dep A
>    +- Dep B
> {noformat}
> Further assume that both dependencies a and B contain the same class X (for whatever reason, say backward-compat). Project P directly uses this class X (hence Dep A being a dependency of P). 
> Currenlty, the ordering of artifacts is ignored by the analyzer such that the {{artifactClassMap}} might list Dep B before Dep A. This in turn will make {{findArtifactForClassName()}} return Dep B as the source artifact for class X which results in the bogus warning "Used undeclared dependency Dep B" because Dep A should have been considered instead as it is first on the class path.

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