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
This commit is contained in:
Brett Leslie Porter 2005-09-29 11:34:02 +00:00
parent 52e8a216ef
commit 638088b075
1 changed files with 2 additions and 31 deletions

View File

@ -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;
}
}
}
}