From 638088b0757b5ea65a4ff5c3dc1fd546a05f94f8 Mon Sep 17 00:00:00 2001 From: Brett Leslie Porter Date: Thu, 29 Sep 2005 11:34:02 +0000 Subject: [PATCH] don't need to depend on parent, it no longer needs to execute first due to reactor handling. can avoid cycles. git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@292419 13f79535-47bb-0310-9956-ffa450edef68 --- .../apache/maven/project/ProjectSorter.java | 33 ++----------------- 1 file changed, 2 insertions(+), 31 deletions(-) diff --git a/maven-project/src/main/java/org/apache/maven/project/ProjectSorter.java b/maven-project/src/main/java/org/apache/maven/project/ProjectSorter.java index e0cb58c77e..6e71a983b3 100644 --- a/maven-project/src/main/java/org/apache/maven/project/ProjectSorter.java +++ b/maven-project/src/main/java/org/apache/maven/project/ProjectSorter.java @@ -27,7 +27,6 @@ import org.codehaus.plexus.util.dag.TopologicalSorter; import java.util.ArrayList; import java.util.Collections; -import java.util.Comparator; import java.util.HashMap; import java.util.Iterator; import java.util.List; @@ -97,6 +96,7 @@ public class ProjectSorter } } +/* TODO: can this be removed? MavenProject parent = project.getParent(); if ( parent != null ) { @@ -106,6 +106,7 @@ public class ProjectSorter dag.addEdge( id, parentId ); } } +*/ List buildPlugins = project.getBuildPlugins(); if ( buildPlugins != null ) @@ -196,34 +197,4 @@ public class ProjectSorter { return dag.getParentLabels( id ); } - - private static class ByProjectFileComparator - implements Comparator - { - - public int compare( Object first, Object second ) - { - MavenProject p1 = (MavenProject) first; - MavenProject p2 = (MavenProject) second; - - String p1Path = p1.getFile().getAbsolutePath(); - String p2Path = p2.getFile().getAbsolutePath(); - - int comparison = p1Path.length() - p2Path.length(); - - if ( comparison > 0 ) - { - return 1; - } - else if ( comparison < 0 ) - { - return -1; - } - else - { - return 0; - } - } - } - }