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

Foo 2.0 obsoletes Bar 1.0

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Duplicate
    • 2.0.8
    • None
    • Dependencies
    • None

    Description

      I would like to be able to say, in a high-level POM:

      "Whenever Foo.jar is in a dependency tree in version 2.0 or above, Bar.jar version 1.0 or below should not also be in that same dependency tree."

      Background:

      • There once was Foo, version 1.0.
      • Then came along the Bar extension, also version 1.0, to be used alongside Foo 1.0.
      • Later, a new version 2.0 of Foo was released, that included the Bar functionality (also updated); so Foo 2.0 made Bar 1.0 obsolete.

      Presently, Maven will happily provide Bar 1.0 alongside with Foo 2.0, thus ushering us into JAR hell. It is then up to JAR lottery which of Bar 1.0 or Foo 2.0's Bar we actually get.

      What I want is a way to fix this in my own top-level POM, in dependency management.
      "If I have Foo 2.0, never even think of including Bar 1.0 also."

      Present workaround:

      • Analyze all low-level POMs.
      • Most use Foo 1.0, leave those alone. (Unfortunately, Foo 2.0 is not without issues.)
      • Find the few that do use Foo 2.0.
      • Figure out all transitive dependencies of such a POM that pull in Bar 1.0.
      • Apply <exclude> to those.

      Regards, and thank you for providing fine software,

      Andreas

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              andreas_krüger Andreas Krüger
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: