Class ResolveDependencies

java.lang.Object
org.maxxq.maven.dependency.ResolveDependencies
All Implemented Interfaces:
IDependencyResolver

public class ResolveDependencies extends Object implements IDependencyResolver
  • Constructor Details

    • ResolveDependencies

      public ResolveDependencies(IRepository repository)
  • Method Details

    • isIgnoreIconsistencies

      public boolean isIgnoreIconsistencies()
    • setIgnoreIconsistencies

      public ResolveDependencies setIgnoreIconsistencies(boolean ignoreIconsistencies)
    • getPomStreamProvider

      public IPomStreamProvider getPomStreamProvider()
    • setPomStreamProvider

      public ResolveDependencies setPomStreamProvider(IPomStreamProvider pomStreamProvider)
    • storeMultiModule

      public List<GAV> storeMultiModule(InputStream inputStream, String relativePathOfGivenPomStream)
      Description copied from interface: IDependencyResolver
      Store the given maven model input stream for later processing, inspect whether the maven project is a multi module project If so follow the modules and also store all child modules. Use the relative path to identify the relative locations of the modules. If the maven project is not a multi module project, then still store it, in that case the relative path can be empty or null
      Specified by:
      storeMultiModule in interface IDependencyResolver
      Parameters:
      inputStream - The inputstream to the parent pom file
      relativePathOfGivenPomStream - The relative path where the pom files for the child modules can be found
      Returns:
      Return the GAV of the root project as first element of the returned list and the GAV's of all modules as subsequent elements in the returned list
    • storeMultiModule

      public List<GAV> storeMultiModule(org.apache.maven.model.Model model, String relativePathOfGivenPomModel)
      Description copied from interface: IDependencyResolver
      Store the given maven model input stream for later processing, inspect whether the maven project is a multi module project If so follow the modules and also store all child modules. Use the relative path to identify the relative locations of the modules. If the maven project is not a multi module project, then still store it, in that case the relative path can be empty or null
      Specified by:
      storeMultiModule in interface IDependencyResolver
      Parameters:
      model - The parent maven model of the multi module project to be stored
      relativePathOfGivenPomModel - The relative path where the child modules can be found
      Returns:
      List Return the GAV of the root project as first element of the returned list and the GAV's of all modules as subsequent elements in the returned list
    • store

      public GAV store(org.apache.maven.model.Model model)
      Description copied from interface: IDependencyResolver
      Store a single maven model
      Specified by:
      store in interface IDependencyResolver
      Parameters:
      model - The maven model to be stored
      Returns:
      the GAV of the stored maven model
    • store

      public GAV store(InputStream inputStream)
      Description copied from interface: IDependencyResolver
      Read the maven model from the given input stream and store it
      Specified by:
      store in interface IDependencyResolver
      Parameters:
      inputStream - The inputstream for the maven module to be stored
      Returns:
      the GAV of the stored maven model
    • getDependencies

      public Set<org.apache.maven.model.Dependency> getDependencies(InputStream... pomStreams)
      Description copied from interface: IDependencyResolver
      Calculate and return the dependencies of the maven projects for which the inputstreams of the pom files are given. The operation is the same as first using the store and then the getDependency method with the GAV of the stored maven model
      Specified by:
      getDependencies in interface IDependencyResolver
      Parameters:
      pomStreams - Inputstreams to the pom files for which dependencies will be resolved
      Returns:
      Set The identified dependencies
    • getDependencies

      public Set<org.apache.maven.model.Dependency> getDependencies(boolean excludeCorrespondingGavs, InputStream... pomStreams)
      Description copied from interface: IDependencyResolver
      Calculate and return the dependencies of the maven artifacts loaded from the given InputStreams if excludeCorrespondingGavs is true then the returned dependencies will not include the resolved GAV's from the inputstreams. This can be handy if you want to exclude the the modules dependencies in a multi module project
      Specified by:
      getDependencies in interface IDependencyResolver
      Parameters:
      excludeCorrespondingGavs - exclude the dependencies corresponding to the given maven projects from the result
      pomStreams - Inputstreams to the pom files for which dependencies will be resolved
      Returns:
      Set The identified dependencies
    • getDependencies

      public Set<org.apache.maven.model.Dependency> getDependencies(InputStream pomStream)
      Description copied from interface: IDependencyResolver
      Calculate and return the dependencies of the maven project for which the inputstream of the pom file is given. The operation is the same as first using the store and then the getDependency method with the GAV of the stored maven model
      Specified by:
      getDependencies in interface IDependencyResolver
      Parameters:
      pomStream - Stream to the pom file for which dependencies will be resolved
      Returns:
      Set The identified dependencies
    • getDependencies

      public Set<org.apache.maven.model.Dependency> getDependencies(Collection<GAV> gavs)
      Description copied from interface: IDependencyResolver
      Calculate and return the dependencies of the maven artifacts with the given GAV's (GroupId, ArtifactId, Version). The given GAV's can be of maven projects that were previously stored or of maven projects that are known in the configured central repository e.g. maven central
      Specified by:
      getDependencies in interface IDependencyResolver
      Parameters:
      gavs - Collection of Groupid-Artifact-Versions for which the dependencies will be resolved
      Returns:
      Set The identified dependencies
    • getDependencies

      public Set<org.apache.maven.model.Dependency> getDependencies(Stream<GAV> gavs)
      Description copied from interface: IDependencyResolver
      Calculate and return the dependencies of the maven artifacts with the given GAV's (GroupId, ArtifactId, Version). The given GAV's can be of maven projects that were previously stored or of maven projects that are known in the configured central repository e.g. maven central
      Specified by:
      getDependencies in interface IDependencyResolver
      Parameters:
      gavs - Stream of Groupid-Artifact-Versions for which the dependencies will be resolved
      Returns:
      Set The identified dependencies
    • getDependencies

      public Set<org.apache.maven.model.Dependency> getDependencies(Stream<GAV> gavs, Collection<GAV> gavsToExclude)
      Description copied from interface: IDependencyResolver
      Calculate and return the dependencies of the maven artifacts with the given GAV's (GroupId, ArtifactId, Version). The given GAV's can be of maven projects that were previously stored or of maven projects that are known in the configured central repository e.g. maven central Exclude from the result the GAVs that are given in gavsToExclude
      Specified by:
      getDependencies in interface IDependencyResolver
      Parameters:
      gavs - Stream of Groupid-Artifact-Versions for which the dependencies will be resolved
      gavsToExclude - Dependencies with GAV's listed in gavsToExclude will not be included in the result
      Returns:
      Set The identified dependencies
    • getDependencies

      public Set<org.apache.maven.model.Dependency> getDependencies(GAV... gavs)
      Description copied from interface: IDependencyResolver
      Calculate and return the dependencies of the maven artifacts with the given GAV's (GroupId, ArtifactId, Version). The given GAV's can be of maven projects that were previously stored or of maven projects that are known in the configured central repository e.g. maven central
      Specified by:
      getDependencies in interface IDependencyResolver
      Parameters:
      gavs - List of Groupid-Artifact-Versions for which the dependencies will be resolved
      Returns:
      Set The identified dependencies
    • getDependencies

      public Set<org.apache.maven.model.Dependency> getDependencies(GAV gav)
      Description copied from interface: IDependencyResolver
      Calculate and return the dependencies of the maven artifact with the given GAV (GroupId, ArtifactId, Version). The given GAV can be of a maven project that was previously stored or of a maven project that is known in the configured central repository e.g. maven central
      Specified by:
      getDependencies in interface IDependencyResolver
      Parameters:
      gav - The Groupid-Artifactid-Version for which the dependencies need to be resolved
      Returns:
      Set of found dependencies
    • setDependenyFilter

      public ResolveDependencies setDependenyFilter(IDependencyFilter dependencyFilter)