Class DefaultDependencyCollectorBuilder

  • All Implemented Interfaces:
    DependencyCollectorBuilder, org.codehaus.plexus.logging.LogEnabled, org.codehaus.plexus.personality.plexus.lifecycle.phase.Contextualizable

    @Component(role=DependencyCollectorBuilder.class)
    public class DefaultDependencyCollectorBuilder
    extends org.codehaus.plexus.logging.AbstractLogEnabled
    implements DependencyCollectorBuilder, org.codehaus.plexus.personality.plexus.lifecycle.phase.Contextualizable
    Default project dependency raw dependency collector API, providing an abstraction layer against Maven 3 and Maven 3.1+ particular Aether implementations.
    Since:
    3.1.0
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected org.codehaus.plexus.PlexusContainer container  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      DependencyNode collectDependencyGraph​(org.apache.maven.project.ProjectBuildingRequest buildingRequest, org.apache.maven.artifact.resolver.filter.ArtifactFilter filter)
      collect the project's raw dependency graph, with information to allow the API client to reason on its own about dependencies.
      void contextualize​(org.codehaus.plexus.context.Context context)
      Injects the Plexus content.
      protected static boolean isMaven31()  
      • 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

      • DefaultDependencyCollectorBuilder

        public DefaultDependencyCollectorBuilder()
    • Method Detail

      • collectDependencyGraph

        public DependencyNode collectDependencyGraph​(org.apache.maven.project.ProjectBuildingRequest buildingRequest,
                                                     org.apache.maven.artifact.resolver.filter.ArtifactFilter filter)
                                              throws DependencyCollectorBuilderException
        Description copied from interface: DependencyCollectorBuilder
        collect the project's raw dependency graph, with information to allow the API client to reason on its own about dependencies.
        Specified by:
        collectDependencyGraph in interface DependencyCollectorBuilder
        Parameters:
        buildingRequest - the request with the project to process its dependencies.
        filter - an artifact filter if not all dependencies are required (can be null)
        Returns:
        the raw dependency tree
        Throws:
        DependencyCollectorBuilderException - if some of the dependencies could not be collected.
      • isMaven31

        protected static boolean isMaven31()
        Returns:
        true if the current Maven version is Maven 3.1.
      • contextualize

        public void contextualize​(org.codehaus.plexus.context.Context context)
                           throws org.codehaus.plexus.context.ContextException
        Injects the Plexus content.
        Specified by:
        contextualize in interface org.codehaus.plexus.personality.plexus.lifecycle.phase.Contextualizable
        Parameters:
        context - Plexus context to inject.
        Throws:
        org.codehaus.plexus.context.ContextException - if the PlexusContainer could not be located.