[ https://issues.apache.org/jira/browse/MRESOLVER-390?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17775098#comment-17775098 ]
ASF GitHub Bot commented on MRESOLVER-390: ------------------------------------------ cstamas merged PR #322: URL: https://github.com/apache/maven-resolver/pull/322 > Customize graph visiting strategy > --------------------------------- > > Key: MRESOLVER-390 > URL: https://issues.apache.org/jira/browse/MRESOLVER-390 > Project: Maven Resolver > Issue Type: Improvement > Components: Resolver > Reporter: Tamas Cservenak > Priority: Major > Fix For: 2.0.0 > > > The classpath built by Maven seems off, see MNG-6357 and there is even a > reproducer. > Reason is simple: we use > [DF|https://github.com/apache/maven-resolver/blob/master/maven-resolver-util/src/main/java/org/eclipse/aether/util/graph/visitor/AbstractDepthFirstNodeListGenerator.java] > 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. -- This message was sent by Atlassian Jira (v8.20.10#820010)