org.apache.continuum.utils
Class ProjectSorter
java.lang.Object
org.apache.continuum.utils.ProjectSorter
public class ProjectSorter
- extends Object
Sort projects by dependencies.
- Version:
- $Id: ProjectSorter.java 777411 2009-05-22 07:13:37Z ctan $
- Author:
- Brett Porter
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
getSortedProjects
public static List<Project> getSortedProjects(Collection<Project> projects,
org.slf4j.Logger logger)
- Sort a list of projects.
- collect all the vertices for the projects that we want to build.
- iterate through the deps of each project and if that dep is within
the set of projects we want to build then add an edge, otherwise throw
the edge away because that dependency is not within the set of projects
we are trying to build. we assume a closed set.
- do a topo sort on the graph that remains.
Copyright © 2003-2013 The Apache Software Foundation. All Rights Reserved.