Uploaded image for project: 'Maven Dependency Plugin'
  1. Maven Dependency Plugin
  2. MDEP-150

Indeterministic artifact ordering can cause bogus warnings

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Trivial
    • Resolution: Fixed
    • Affects Version/s: 2.0
    • Fix Version/s: 2.1
    • Component/s: analyze
    • Labels:
      None
    • Flags:
      Patch

      Description

      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:

      Project P
      +- Dep A
         +- Dep B
      

      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.

        Attachments

        Issue Links

          Activity

            People

            • Assignee:
              brianf Brian E Fox
              Reporter:
              bentmann Benjamin Bentmann

              Dates

              • Created:
                Updated:
                Resolved:

                Issue deployment