de.matthias_burbach.deputy.core
Class ProjectRecursor

java.lang.Object
  extended byde.matthias_burbach.deputy.core.ProjectRecursor

public class ProjectRecursor
extends java.lang.Object

Parses a project and its dependencies recursively. Applies rules to decide which versions of the dependencies to follow while parsing.

Author:
Matthias Burbach

Constructor Summary
ProjectRecursor(java.util.List repositoryConfigs, Log userLog)
           
 
Method Summary
 Project applyRulesToProject(java.lang.String projectFile, Project project, boolean virtualRepositoryActive)
           
 Project openProjectAsIs(java.lang.String projectFile, boolean virtualRepositoryActive)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ProjectRecursor

public ProjectRecursor(java.util.List repositoryConfigs,
                       Log userLog)
Parameters:
repositoryConfigs - The list of configs of type RepositoryConfig pointing to the repositories of Maven project object model files (POMs) to be used.
userLog - The user's log to write messages to while recursing.
Method Detail

openProjectAsIs

public Project openProjectAsIs(java.lang.String projectFile,
                               boolean virtualRepositoryActive)
                        throws java.lang.Exception
Parameters:
projectFile - The absolute path and file name of the Maven project to open. Must not be null.
virtualRepositoryActive - Whether to use the virtual repository in the dependency recursion.
Returns:
The top Maven project of the dependency graph of recursively parsed Maven projects.
Throws:
java.lang.Exception - if anything goes unexpectedly wrong

applyRulesToProject

public Project applyRulesToProject(java.lang.String projectFile,
                                   Project project,
                                   boolean virtualRepositoryActive)
                            throws java.lang.Exception
Parameters:
projectFile - The absolute path and file name of the Maven project to parse recursively. Must not be null.
project - The project to apply the rules to. Must not be null.
virtualRepositoryActive - Whether to use the virtual repository in the dependency recursion.
Returns:
The top Maven project of the dependency tree of recursively parsed Maven projects after applying the rules.
Throws:
java.lang.Exception - if anything goes unexpectedly wrong


Copyright © 2005-2007 . All Rights Reserved.