belingueres commented on code in PR #281:
URL: https://github.com/apache/maven/pull/281#discussion_r3942372308


##########
impl/maven-core/src/main/java/org/apache/maven/RepositoryUtils.java:
##########
@@ -65,6 +68,50 @@
  */
 public class RepositoryUtils {
 
+    @FunctionalInterface
+    private interface ArtifactOrderingStrategy {
+        void apply(
+                Collection<org.apache.maven.artifact.Artifact> artifacts,
+                Collection<? extends DependencyNode> nodes,
+                List<String> trail,
+                DependencyFilter filter);
+    }
+
+    public enum ArtifactOrdering {
+        /**
+         * Depth-first traversal of the dependency graph to convert nodes to 
artifacts. This is the original behavior.
+         */
+        DFS(RepositoryUtils::toArtifactsDFS),
+        /**
+         * Breadth-first traversal of the dependency graph to convert nodes to 
artifacts, using TreeMap to store artifacts by depth. This is the new behavior.
+         */
+        BFS(RepositoryUtils::toArtifactsBFS),
+        /**
+         * Breadth-first traversal of the dependency graph, using a List of 
List to store artifacts by depth, and a stack to keep the dependency trail. 
This is the new behavior.

Review Comment:
   fixed



##########
impl/maven-core/src/main/java/org/apache/maven/RepositoryUtils.java:
##########
@@ -132,6 +187,97 @@ public static void toArtifacts(
         }
     }
 
+    private static void toArtifactsBFS(

Review Comment:
   fixed to private



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to