Package org.maxxq.maven.dependency
Class ResolveDependencies
java.lang.Object
org.maxxq.maven.dependency.ResolveDependencies
- All Implemented Interfaces:
IDependencyResolver
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionSet<org.apache.maven.model.Dependency>getDependencies(boolean excludeCorrespondingGavs, InputStream... pomStreams) 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.Set<org.apache.maven.model.Dependency>getDependencies(InputStream pomStream) Calculate and return the dependencies of the maven project for which the inputstream of the pom file is given.Set<org.apache.maven.model.Dependency>getDependencies(InputStream... pomStreams) Calculate and return the dependencies of the maven projects for which the inputstreams of the pom files are given.Set<org.apache.maven.model.Dependency>getDependencies(Collection<GAV> gavs) Calculate and return the dependencies of the maven artifacts with the given GAV's (GroupId, ArtifactId, Version).Set<org.apache.maven.model.Dependency>getDependencies(Stream<GAV> gavs) Calculate and return the dependencies of the maven artifacts with the given GAV's (GroupId, ArtifactId, Version).Set<org.apache.maven.model.Dependency>getDependencies(Stream<GAV> gavs, Collection<GAV> gavsToExclude) Calculate and return the dependencies of the maven artifacts with the given GAV's (GroupId, ArtifactId, Version).Set<org.apache.maven.model.Dependency>getDependencies(GAV gav) Calculate and return the dependencies of the maven artifact with the given GAV (GroupId, ArtifactId, Version).Set<org.apache.maven.model.Dependency>getDependencies(GAV... gavs) Calculate and return the dependencies of the maven artifacts with the given GAV's (GroupId, ArtifactId, Version).booleansetDependenyFilter(IDependencyFilter dependencyFilter) setIgnoreIconsistencies(boolean ignoreIconsistencies) setPomStreamProvider(IPomStreamProvider pomStreamProvider) store(InputStream inputStream) Read the maven model from the given input stream and store itstore(org.apache.maven.model.Model model) Store a single maven modelstoreMultiModule(InputStream inputStream, String relativePathOfGivenPomStream) 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.storeMultiModule(org.apache.maven.model.Model model, String relativePathOfGivenPomModel) 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.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.maxxq.maven.dependency.IDependencyResolver
storeMultiModule, storeMultiModule
-
Constructor Details
-
ResolveDependencies
-
-
Method Details
-
isIgnoreIconsistencies
public boolean isIgnoreIconsistencies() -
setIgnoreIconsistencies
-
getPomStreamProvider
-
setPomStreamProvider
-
storeMultiModule
Description copied from interface:IDependencyResolverStore 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:
storeMultiModulein interfaceIDependencyResolver- Parameters:
inputStream- The inputstream to the parent pom filerelativePathOfGivenPomStream- 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:IDependencyResolverStore 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:
storeMultiModulein interfaceIDependencyResolver- Parameters:
model- The parent maven model of the multi module project to be storedrelativePathOfGivenPomModel- 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
Description copied from interface:IDependencyResolverStore a single maven model- Specified by:
storein interfaceIDependencyResolver- Parameters:
model- The maven model to be stored- Returns:
- the GAV of the stored maven model
-
store
Description copied from interface:IDependencyResolverRead the maven model from the given input stream and store it- Specified by:
storein interfaceIDependencyResolver- Parameters:
inputStream- The inputstream for the maven module to be stored- Returns:
- the GAV of the stored maven model
-
getDependencies
Description copied from interface:IDependencyResolverCalculate 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:
getDependenciesin interfaceIDependencyResolver- 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:IDependencyResolverCalculate 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:
getDependenciesin interfaceIDependencyResolver- Parameters:
excludeCorrespondingGavs- exclude the dependencies corresponding to the given maven projects from the resultpomStreams- Inputstreams to the pom files for which dependencies will be resolved- Returns:
- Set The identified dependencies
-
getDependencies
Description copied from interface:IDependencyResolverCalculate 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:
getDependenciesin interfaceIDependencyResolver- Parameters:
pomStream- Stream to the pom file for which dependencies will be resolved- Returns:
- Set The identified dependencies
-
getDependencies
Description copied from interface:IDependencyResolverCalculate 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:
getDependenciesin interfaceIDependencyResolver- Parameters:
gavs- Collection of Groupid-Artifact-Versions for which the dependencies will be resolved- Returns:
- Set The identified dependencies
-
getDependencies
Description copied from interface:IDependencyResolverCalculate 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:
getDependenciesin interfaceIDependencyResolver- 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:IDependencyResolverCalculate 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:
getDependenciesin interfaceIDependencyResolver- Parameters:
gavs- Stream of Groupid-Artifact-Versions for which the dependencies will be resolvedgavsToExclude- Dependencies with GAV's listed in gavsToExclude will not be included in the result- Returns:
- Set The identified dependencies
-
getDependencies
Description copied from interface:IDependencyResolverCalculate 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:
getDependenciesin interfaceIDependencyResolver- Parameters:
gavs- List of Groupid-Artifact-Versions for which the dependencies will be resolved- Returns:
- Set The identified dependencies
-
getDependencies
Description copied from interface:IDependencyResolverCalculate 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:
getDependenciesin interfaceIDependencyResolver- Parameters:
gav- The Groupid-Artifactid-Version for which the dependencies need to be resolved- Returns:
- Set of found dependencies
-
setDependenyFilter
-