Java 类org.apache.maven.project.ProjectSorter 实例源码

项目:oceano    文件:DefaultMaven.java   
private ProjectDependencyGraph createDependencyGraph( ProjectSorter sorter, MavenExecutionRequest request )
    throws MavenExecutionException
{
    ProjectDependencyGraph graph = new DefaultProjectDependencyGraph( sorter );

    List<MavenProject> activeProjects = sorter.getSortedProjects();

    activeProjects = trimSelectedProjects( activeProjects, graph, request );
    activeProjects = trimResumedProjects( activeProjects, request );

    if ( activeProjects.size() != sorter.getSortedProjects().size() )
    {
        graph = new FilteredProjectDependencyGraph( graph, activeProjects );
    }

    return graph;
}
项目:oceano    文件:DefaultProjectDependencyGraph.java   
/**
 * Creates a new project dependency graph based on the specified project sorting.
 * 
 * @param sorter The project sorter backing the graph, must not be {@code null}.
 */
public DefaultProjectDependencyGraph( ProjectSorter sorter )
{
    if ( sorter == null )
    {
        throw new IllegalArgumentException( "project sorter missing" );
    }

    this.sorter = sorter;
}
项目:oceano    文件:DefaultProjectDependencyGraph.java   
public List<MavenProject> getDownstreamProjects( MavenProject project, boolean transitive )
{
    if ( project == null )
    {
        throw new IllegalArgumentException( "project missing" );
    }

    Collection<String> projectIds = new HashSet<String>();

    getDownstreamProjects( ProjectSorter.getId( project ), projectIds, transitive );

    return getProjects( projectIds );
}
项目:oceano    文件:DefaultProjectDependencyGraph.java   
public List<MavenProject> getUpstreamProjects( MavenProject project, boolean transitive )
{
    if ( project == null )
    {
        throw new IllegalArgumentException( "project missing" );
    }

    Collection<String> projectIds = new HashSet<String>();

    getUpstreamProjects( ProjectSorter.getId( project ), projectIds, transitive );

    return getProjects( projectIds );
}
项目:oceano    文件:DefaultProjectDependencyGraph.java   
private List<MavenProject> getProjects( Collection<String> projectIds )
{
    List<MavenProject> projects = new ArrayList<MavenProject>();

    for ( MavenProject p : sorter.getSortedProjects() )
    {
        if ( projectIds.contains( ProjectSorter.getId( p ) ) )
        {
            projects.add( p );
        }
    }

    return projects;
}
项目:release-maven-plugin-parent    文件:JGitDiscoveryTest.java   
@Test public void blah() throws Exception {
    ArrayList projects = new ArrayList();
    projects.add(new MavenProject());
    new ProjectSorter(projects);
}
项目:multi-module-maven-release-plugin    文件:JGitDiscoveryTest.java   
@Test public void blah() throws Exception {
    ArrayList projects = new ArrayList();
    projects.add(new MavenProject());
    new ProjectSorter(projects);
}
项目:oceano    文件:ReactorManager.java   
public ReactorManager( List projects )
    throws CycleDetectedException, DuplicateProjectException
{
    this.sorter = new ProjectSorter( projects );
}