Class DefaultDependencyCollector

java.lang.Object
org.apache.maven.shared.transfer.collection.internal.DefaultDependencyCollector
All Implemented Interfaces:
DependencyCollector, org.codehaus.plexus.personality.plexus.lifecycle.phase.Contextualizable

@Component(role=DependencyCollector.class, hint="default") class DefaultDependencyCollector extends Object implements DependencyCollector, org.codehaus.plexus.personality.plexus.lifecycle.phase.Contextualizable
This DependencyCollector passes the request to the proper Maven 3.x implementation
  • Field Details

    • container

      private org.codehaus.plexus.PlexusContainer container
  • Constructor Details

    • DefaultDependencyCollector

      DefaultDependencyCollector()
  • Method Details

    • collectDependencies

      public CollectResult collectDependencies(org.apache.maven.project.ProjectBuildingRequest buildingRequest, org.apache.maven.model.Dependency root) throws DependencyCollectionException
      Description copied from interface: DependencyCollector
      Collects the transitive dependencies of some artifacts and builds a dependency graph. Note that this operation is only concerned about determining the coordinates of the transitive dependencies and does not actually resolve the artifact files. The supplied session carries various hooks to customize the dependency graph that must be invoked throughout the operation.
      Specified by:
      collectDependencies in interface DependencyCollector
      Parameters:
      buildingRequest - The Maven project buildingrequest, must not be null.
      root - The Maven Dependency, must not be null.
      Returns:
      The collection result, never null.
      Throws:
      DependencyCollectionException - If the dependency tree could not be built.
    • collectDependencies

      public CollectResult collectDependencies(org.apache.maven.project.ProjectBuildingRequest buildingRequest, DependableCoordinate root) throws DependencyCollectionException
      Description copied from interface: DependencyCollector
      Collects the transitive dependencies of some artifacts and builds a dependency graph. Note that this operation is only concerned about determining the coordinates of the transitive dependencies and does not actually resolve the artifact files. The supplied session carries various hooks to customize the dependency graph that must be invoked throughout the operation.
      Specified by:
      collectDependencies in interface DependencyCollector
      Parameters:
      buildingRequest - The Maven project buildingrequest, must not be null.
      root - The Maven DependableCoordinate, must not be null.
      Returns:
      The collection result, never null.
      Throws:
      DependencyCollectionException - If the dependency tree could not be built.
    • collectDependencies

      public CollectResult collectDependencies(org.apache.maven.project.ProjectBuildingRequest buildingRequest, org.apache.maven.model.Model root) throws DependencyCollectionException
      Description copied from interface: DependencyCollector
      Collects the transitive dependencies of some artifacts and builds a dependency graph. Note that this operation is only concerned about determining the coordinates of the transitive dependencies and does not actually resolve the artifact files. The supplied session carries various hooks to customize the dependency graph that must be invoked throughout the operation.
      Specified by:
      collectDependencies in interface DependencyCollector
      Parameters:
      buildingRequest - The Maven project buildingrequest, must not be null.
      root - The Maven model, must not be null.
      Returns:
      The collection result, never null.
      Throws:
      DependencyCollectionException - If the dependency tree could not be built.
    • validateParameters

      private void validateParameters(org.apache.maven.project.ProjectBuildingRequest buildingRequest, DependableCoordinate root)
    • validateParameters

      private void validateParameters(org.apache.maven.project.ProjectBuildingRequest buildingRequest, org.apache.maven.model.Dependency root)
    • validateParameters

      private void validateParameters(org.apache.maven.project.ProjectBuildingRequest buildingRequest, org.apache.maven.model.Model root)
    • validateBuildingRequestAndRoot

      private void validateBuildingRequestAndRoot(org.apache.maven.project.ProjectBuildingRequest buildingRequest, Object root)
    • validateBuildingRequest

      private void validateBuildingRequest(org.apache.maven.project.ProjectBuildingRequest buildingRequest)
    • validateRoot

      private void validateRoot(Object root)
    • isMaven31

      private 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.
    • getMavenDependencyCollector

      private MavenDependencyCollector getMavenDependencyCollector(org.apache.maven.project.ProjectBuildingRequest buildingRequest) throws org.codehaus.plexus.component.repository.exception.ComponentLookupException, DependencyCollectionException
      Throws:
      org.codehaus.plexus.component.repository.exception.ComponentLookupException
      DependencyCollectionException