org.apache.maven.jelly.tags.maven
Class WerkzDependencyResolver

java.lang.Object
  extended byorg.apache.maven.jelly.tags.maven.WerkzDependencyResolver
All Implemented Interfaces:
DependencyResolverInterface

public class WerkzDependencyResolver
extends java.lang.Object
implements DependencyResolverInterface

THIS CLASS IS NOT THREADSAFE.

Version:
$Id: WerkzDependencyResolver.java 517014 2007-03-11 21:15:50Z ltheussl $
Author:
Ben Walding

Constructor Summary
WerkzDependencyResolver()
           
 
Method Summary
 void buildGraph()
          Builds the projects / dependencies into an internal acyclic directed graph
 void clear()
          Clear the project list and set the graph built flag to false.
protected  ProjectGoal getExistingGoal(Project project)
          Retrieves the existing goal for a project (based on Id).
protected  ProjectGoal getOrCreateGoal(Project project, boolean sourceBuild)
          Retrieves the existing goal for a project (based on Id).
 java.util.List getProjects(java.util.List goals, boolean sourceBuild)
          Filters the given list of goals, and returns the associated projects

If param:sourceBuild == true, include goal If param:sourceBuild == false, include goal if goal:sourceBuild == true

 java.util.List getSortedDependencies(boolean sourceBuild)
          Get the list of projects in dependency sorted order.
 java.util.List getSortedDependencies(Project project)
          Get the list of projects in dependency sorted order.
 java.util.List getSortedDependencies(Project project, boolean sourceBuild)
          Get the list of projects in dependency sorted order.
 void setProjects(java.util.List projects)
          Set a list of projects to process.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WerkzDependencyResolver

public WerkzDependencyResolver()
Method Detail

clear

public void clear()
Description copied from interface: DependencyResolverInterface
Clear the project list and set the graph built flag to false.

Specified by:
clear in interface DependencyResolverInterface
See Also:
DependencyResolverInterface.clear()

setProjects

public void setProjects(java.util.List projects)
Description copied from interface: DependencyResolverInterface
Set a list of projects to process.

Specified by:
setProjects in interface DependencyResolverInterface
Parameters:
projects - List of projects.
See Also:
DependencyResolverInterface.setProjects(java.util.List)

getExistingGoal

protected ProjectGoal getExistingGoal(Project project)
Retrieves the existing goal for a project (based on Id). If no goal exists, an exception is thrown.

Parameters:
project - the project to retrieve a goal from
Returns:
ProjectGoal

getOrCreateGoal

protected ProjectGoal getOrCreateGoal(Project project,
                                      boolean sourceBuild)
Retrieves the existing goal for a project (based on Id). If no goal exists, one is created for this given project.

Parameters:
project -
sourceBuild -
Returns:
ProjectGoal

buildGraph

public void buildGraph()
                throws CyclicGoalChainException
Builds the projects / dependencies into an internal acyclic directed graph

Throws:
CyclicGoalChainException

getSortedDependencies

public java.util.List getSortedDependencies(Project project)
                                     throws DependencyResolverException
Description copied from interface: DependencyResolverInterface
Get the list of projects in dependency sorted order.

Specified by:
getSortedDependencies in interface DependencyResolverInterface
Parameters:
project - The project to use as the head of the graph.
Returns:
The list of projects.
Throws:
DependencyResolverException - If an error occurs while processing the graph.
See Also:
DependencyResolverInterface.getSortedDependencies(org.apache.maven.project.Project)

getProjects

public java.util.List getProjects(java.util.List goals,
                                  boolean sourceBuild)
Filters the given list of goals, and returns the associated projects

If param:sourceBuild == true, include goal If param:sourceBuild == false, include goal if goal:sourceBuild == true

Parameters:
goals -
sourceBuild -
Returns:
List

getSortedDependencies

public java.util.List getSortedDependencies(Project project,
                                            boolean sourceBuild)
                                     throws DependencyResolverException
Description copied from interface: DependencyResolverInterface
Get the list of projects in dependency sorted order.

Specified by:
getSortedDependencies in interface DependencyResolverInterface
Parameters:
project - The project to use as the head of the graph.
sourceBuild - Indicate we are performing a source build.
Returns:
The list of projects.
Throws:
DependencyResolverException - If an error occurs while processing the graph.
See Also:
DependencyResolverInterface.getSortedDependencies(org.apache.maven.project.Project, boolean)

getSortedDependencies

public java.util.List getSortedDependencies(boolean sourceBuild)
                                     throws DependencyResolverException
Description copied from interface: DependencyResolverInterface
Get the list of projects in dependency sorted order.

Specified by:
getSortedDependencies in interface DependencyResolverInterface
Parameters:
sourceBuild - Flag to indicate we are performing a source build.
Returns:
The list of projects.
Throws:
DependencyResolverException - If an error occurs while processing the graph.
See Also:
DependencyResolverInterface.getSortedDependencies(boolean)


Copyright © 2001-2008 Apache Software Foundation. All Rights Reserved.