org.apache.maven.shared.dependency.graph.internal
Class DefaultDependencyGraphBuilder

java.lang.Object
  extended by org.codehaus.plexus.logging.AbstractLogEnabled
      extended by org.apache.maven.shared.dependency.graph.internal.DefaultDependencyGraphBuilder
All Implemented Interfaces:
DependencyGraphBuilder, org.codehaus.plexus.logging.LogEnabled, org.codehaus.plexus.personality.plexus.lifecycle.phase.Contextualizable

@Component(role=DependencyGraphBuilder.class)
public class DefaultDependencyGraphBuilder
extends org.codehaus.plexus.logging.AbstractLogEnabled
implements DependencyGraphBuilder, org.codehaus.plexus.personality.plexus.lifecycle.phase.Contextualizable

Default dependency graph builder that detects current Maven version to delegate to either Maven 2 or Maven 3 specific code.

Since:
2.0
Author:
Hervé Boutemy
See Also:
Maven2DependencyGraphBuilder, Maven3DependencyGraphBuilder

Field Summary
protected  org.codehaus.plexus.PlexusContainer container
           
 
Constructor Summary
DefaultDependencyGraphBuilder()
           
 
Method Summary
 DependencyNode buildDependencyGraph(MavenProject project, ArtifactFilter filter)
          Build the dependency graph.
 void contextualize(org.codehaus.plexus.context.Context context)
           
protected static boolean isMaven2x()
          Check the current Maven version to see if it's Maven 2.x.
 
Methods inherited from class org.codehaus.plexus.logging.AbstractLogEnabled
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

container

protected org.codehaus.plexus.PlexusContainer container
Constructor Detail

DefaultDependencyGraphBuilder

public DefaultDependencyGraphBuilder()
Method Detail

buildDependencyGraph

public DependencyNode buildDependencyGraph(MavenProject project,
                                           ArtifactFilter filter)
                                    throws DependencyGraphBuilderException
Description copied from interface: DependencyGraphBuilder
Build the dependency graph.

Specified by:
buildDependencyGraph in interface DependencyGraphBuilder
Parameters:
project - the project
filter - artifact filter (can be null
Returns:
the dependency graph
Throws:
DependencyGraphBuilderException

isMaven2x

protected static boolean isMaven2x()
Check the current Maven version to see if it's Maven 2.x.


contextualize

public void contextualize(org.codehaus.plexus.context.Context context)
                   throws org.codehaus.plexus.context.ContextException
Specified by:
contextualize in interface org.codehaus.plexus.personality.plexus.lifecycle.phase.Contextualizable
Throws:
org.codehaus.plexus.context.ContextException


Copyright © 2002-2012 The Apache Software Foundation. All Rights Reserved.