@Component(role=DependenciesTool.class, hint="default") public class DefaultDependenciesTool extends org.codehaus.plexus.logging.AbstractLogEnabled implements DependenciesTool
DependenciesTool.| Modifier and Type | Field and Description |
|---|---|
static String |
INVALID_PATTERN_MESSAGE
Message used when an invalid expression pattern is found.
|
protected static com.fasterxml.jackson.databind.ObjectMapper |
MAPPER |
| Constructor and Description |
|---|
DefaultDependenciesTool() |
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
isExcludable(org.apache.maven.artifact.Artifact project,
Pattern excludedGroupPattern,
Pattern excludedArtifactPattern)
Tests if the given project is excludable against a groupdId pattern and a artifact pattern.
|
protected boolean |
isIncludable(org.apache.maven.artifact.Artifact project,
Pattern includedGroupPattern,
Pattern includedArtifactPattern)
Tests if the given project is includeable against a groupdId pattern and a artifact pattern.
|
void |
loadProjectArtifacts(org.apache.maven.artifact.repository.ArtifactRepository localRepository,
List remoteRepositories,
org.apache.maven.project.MavenProject project,
Map<String,List<org.apache.maven.model.Dependency>> reactorProjectDependencies)
Load project artifacts.
|
SortedMap<String,org.apache.maven.project.MavenProject> |
loadProjectDependencies(org.apache.maven.project.MavenProject project,
MavenProjectDependenciesConfigurator configuration,
org.apache.maven.artifact.repository.ArtifactRepository localRepository,
List<org.apache.maven.artifact.repository.ArtifactRepository> remoteRepositories,
SortedMap<String,org.apache.maven.project.MavenProject> cache)
For a given
project, obtain the universe of its dependencies after applying transitivity and
filtering rules given in the configuration object. |
void |
writeThirdPartyDependenciesFile(File outputDirectory,
String listedDependenciesFilePath,
Set<Dependency> listedDependencies) |
public static final String INVALID_PATTERN_MESSAGE
protected static final com.fasterxml.jackson.databind.ObjectMapper MAPPER
public SortedMap<String,org.apache.maven.project.MavenProject> loadProjectDependencies(org.apache.maven.project.MavenProject project, MavenProjectDependenciesConfigurator configuration, org.apache.maven.artifact.repository.ArtifactRepository localRepository, List<org.apache.maven.artifact.repository.ArtifactRepository> remoteRepositories, SortedMap<String,org.apache.maven.project.MavenProject> cache)
project, obtain the universe of its dependencies after applying transitivity and
filtering rules given in the configuration object.
Result is given in a map where keys are unique artifact idloadProjectDependencies in interface DependenciesToolproject - the project to scannconfiguration - the configurationlocalRepository - local repository used to resolv dependenciesremoteRepositories - remote repositories used to resolv dependenciescache - a optional cache where to keep resolved dependenciesMavenProjectDependenciesConfiguratorpublic void loadProjectArtifacts(org.apache.maven.artifact.repository.ArtifactRepository localRepository,
List remoteRepositories,
org.apache.maven.project.MavenProject project,
Map<String,List<org.apache.maven.model.Dependency>> reactorProjectDependencies)
throws DependenciesToolException
loadProjectArtifacts in interface DependenciesToollocalRepository - local repository used to resolv dependenciesremoteRepositories - remote repositories used to resolv dependenciesproject - the project to scannreactorProjectDependencies - optional reactor projects dependencies indexed by their gav to resolve artifacts without fork mode (means artifacts may not exist)DependenciesToolException - if could not load project dependenciespublic void writeThirdPartyDependenciesFile(File outputDirectory, String listedDependenciesFilePath, Set<Dependency> listedDependencies) throws IOException
writeThirdPartyDependenciesFile in interface DependenciesToolIOExceptionprotected boolean isIncludable(org.apache.maven.artifact.Artifact project,
Pattern includedGroupPattern,
Pattern includedArtifactPattern)
project - the project to testincludedGroupPattern - the include group patternincludedArtifactPattern - the include artifact pattenrtrue if the project is includavble, false otherwiseprotected boolean isExcludable(org.apache.maven.artifact.Artifact project,
Pattern excludedGroupPattern,
Pattern excludedArtifactPattern)
project - the project to testexcludedGroupPattern - the exlcude group patternexcludedArtifactPattern - the exclude artifact pattenrtrue if the project is excludable, false otherwiseCopyright © 2010–2023. All rights reserved.