Class DefaultDependencyCollector

  • All Implemented Interfaces:
    DependencyCollector, org.codehaus.plexus.personality.plexus.lifecycle.phase.Contextualizable

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

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

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      CollectResult collectDependencies​(org.apache.maven.project.ProjectBuildingRequest buildingRequest, org.apache.maven.model.Dependency root)
      Collects the transitive dependencies of some artifacts and builds a dependency graph.
      CollectResult collectDependencies​(org.apache.maven.project.ProjectBuildingRequest buildingRequest, org.apache.maven.model.Model root)
      Collects the transitive dependencies of some artifacts and builds a dependency graph.
      CollectResult collectDependencies​(org.apache.maven.project.ProjectBuildingRequest buildingRequest, DependableCoordinate root)
      Collects the transitive dependencies of some artifacts and builds a dependency graph.
      void contextualize​(org.codehaus.plexus.context.Context context)
      Injects the Plexus content.
      private MavenDependencyCollector getMavenDependencyCollector​(org.apache.maven.project.ProjectBuildingRequest buildingRequest)  
      private boolean isMaven31()  
      private void validateBuildingRequest​(org.apache.maven.project.ProjectBuildingRequest buildingRequest)  
      private void validateBuildingRequestAndRoot​(org.apache.maven.project.ProjectBuildingRequest buildingRequest, java.lang.Object root)  
      private void validateParameters​(org.apache.maven.project.ProjectBuildingRequest buildingRequest, org.apache.maven.model.Dependency root)  
      private void validateParameters​(org.apache.maven.project.ProjectBuildingRequest buildingRequest, org.apache.maven.model.Model root)  
      private void validateParameters​(org.apache.maven.project.ProjectBuildingRequest buildingRequest, DependableCoordinate root)  
      private void validateRoot​(java.lang.Object root)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • container

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

      • DefaultDependencyCollector

        DefaultDependencyCollector()
    • Method Detail

      • 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,
                                                    java.lang.Object root)
      • validateBuildingRequest

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

        private void validateRoot​(java.lang.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.