Class DefaultProjectDependencyAnalyzer

java.lang.Object
org.apache.maven.shared.dependency.analyzer.DefaultProjectDependencyAnalyzer
All Implemented Interfaces:
ProjectDependencyAnalyzer

@Named @Singleton public class DefaultProjectDependencyAnalyzer extends Object implements ProjectDependencyAnalyzer

DefaultProjectDependencyAnalyzer class.

Author:
Mark Hobson
  • Constructor Details

    • DefaultProjectDependencyAnalyzer

      public DefaultProjectDependencyAnalyzer()
      Constructor used by Sisu.
  • Method Details

    • analyze

      public ProjectDependencyAnalysis analyze(org.apache.maven.project.MavenProject project, Collection<String> excludedClasses) throws ProjectDependencyAnalyzerException
      Analyzes the dependencies of a project, leaving out the classes that match excludedClasses both in the project and in its dependencies.
      Specified by:
      analyze in interface ProjectDependencyAnalyzer
      Parameters:
      project - the project to analyze
      excludedClasses - regular expressions of class names to exclude, or null for none
      Returns:
      the analysis result
      Throws:
      ProjectDependencyAnalyzerException - if the classes of the project or of a dependency cannot be read
    • buildArtifactClassMap

      protected Map<org.apache.maven.artifact.Artifact,Set<String>> buildArtifactClassMap(org.apache.maven.project.MavenProject project, ClassesPatterns excludedClasses) throws IOException
      Maps dependency artifacts to their classes.
      Parameters:
      project - Maven project
      excludedClasses - patterns of classes to exclude
      Returns:
      dependency artifacts and their classes
      Throws:
      IOException - if a dependency cannot be read