Uploaded image for project: 'Maven Resolver'
  1. Maven Resolver
  2. MRESOLVER-390

Customize graph visiting strategy

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 2.0.0-alpha-1, 2.0.0
    • Resolver
    • None

    Description

      The classpath built by Maven seems off, see MNG-6357 and there is even a reproducer.

      Reason is simple: we use DF derivatives to create classpath.

      Fix: Resolver (and thus Maven) had "wired in" strategy to flatten dependency graph into list, and it was always "preOrder", while there existed alternate solutions like "postOrder". This PR introduces "levelOrder" as asked by users, and also makes it configurable (via session config) which strategy should be used, and exposes helper classes and methods.

      Now session can be configured to use following strategies to flatten the graph:

      • "preOrder" – as before
      • "postOrder" – was already present
      • "levelOrder" – as asked by users, artifact list is ordered by their depth (distance from root)

      By default, this PR introduces NO behavior changes, but opens configuration that does allow to alter these.

      Attachments

        Issue Links

          Activity

            People

              cstamas Tamas Cservenak
              cstamas Tamas Cservenak
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: