Uploaded image for project: 'Maven'
  1. Maven
  2. MNG-3197

Direct dependencies should come before transitive dependencies in build classpath.

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

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Duplicate
    • 2.0.7
    • None
    • None
    • None

    Description

      Currently the transitive dependencies appear to take priority over direct dependencies in the compile and test classpaths.
      For example project A depends on B version 2 and C version 1:
      A -> B.2
      A -> C.1 -> B.1

      When the tests are run, the classpath will be in an order similar to:
      B.1:C.1:B.2

      Since B.1 comes first in the classpath, it will be used when running the tests. But it seems that B.2 should be used when testing because it has the direct dependency.

      Attachments

        Issue Links

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            carlos Carlos Sanchez Gonzalez
            pgier Paul Gier
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Issue deployment