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

Dependency resolution in multimodule project

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 3.6.3
    • Fix Version/s: None
    • Component/s: Dependencies, POM
    • Labels:
      None

      Description

      I have a bunch of modules under parent pom. In the parent pom, there is a dependency management section that defines the 2.12.0 version of the Jackson library. However, in one of the modules (Module One), I need to downgrade the version to 2.10.5 due to compatibility issues. For this module, it works well. There is a second module(Module Two) that has a dependency on Module One. And for this dependency maven resolves the version of Jackson to 2.12.0. But Module Two actually doesn't declare a dependency on Jackson at all, just dependency on Module One. In the end, I'm getting compatibility issues here.

      It can be resolved by explicitly specifying a dependency on Jackson 2.10.5 in Module Two, but it still looks like a bug.

      I've created a very small project to demonstrate the problem. You can check out it here https://github.com/DrBAXA/maven-test or just download the attached archive.

      In maven-test-lib and maven-test-app there are just two test files. One of them fails as expecting 2.10.5 version

        Attachments

        1. maven-test.zip
          4 kB
          Vasyl Danyliuk

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              vdanyliuk Vasyl Danyliuk
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated: