org.apache.maven.project
Class ProjectSorter
public
class
ProjectSorter
extends Object
Sort projects by dependencies.
Version: $Id: ProjectSorter.java 328898 2005-10-27 15:40:47Z jdcasey $
Author: Brett Porter
public ProjectSorter(List projects)
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.
Throws: DuplicateProjectException if any projects are duplicated by id
public List getDependents(String id)
public List getSortedProjects()
public boolean hasMultipleProjects()
Copyright © 2001-2009 Apache Software Foundation. All Rights Reserved.