public abstract class AbstractDependencyFilterMojo extends AbstractDependencyMojo
AbstractDependencyMojo
Modifier and Type | Field and Description |
---|---|
protected String |
classifier
Specify classifier to look for.
|
protected String |
excludeArtifactIds
Comma separated list of Artifact names to exclude.
|
protected String |
excludeClassifiers
Comma Separated list of Classifiers to exclude.
|
protected String |
excludeGroupIds
Comma separated list of GroupId Names to exclude.
|
protected String |
excludeScope
Scope threshold to exclude, if no value is defined for include.
|
protected boolean |
excludeTransitive
If we should exclude transitive dependencies
|
protected String |
excludeTypes
Comma Separated list of Types to exclude.
|
protected String |
includeArtifactIds
Comma separated list of Artifact names to include.
|
protected String |
includeClassifiers
Comma Separated list of Classifiers to include.
|
protected String |
includeGroupIds
Comma separated list of GroupIds to include.
|
protected String |
includeScope
Scope threshold to include.
|
protected String |
includeTypes
Comma Separated list of Types to include.
|
protected File |
markersDirectory
Directory to store flag files
|
protected boolean |
overWriteIfNewer
Overwrite artifacts that don't exist or are older than the source.
|
protected boolean |
overWriteReleases
Overwrite release artifacts
|
protected boolean |
overWriteSnapshots
Overwrite snapshot artifacts
|
protected boolean |
prependGroupId
Prepend the groupId during copy.
|
protected String |
type
Specify type to look for when constructing artifact based on classifier.
|
outputAbsoluteArtifactFilename, reactorProjects, session
Constructor and Description |
---|
AbstractDependencyFilterMojo() |
Modifier and Type | Method and Description |
---|---|
protected DependencyStatusSets |
filterMarkedDependencies(Set<org.apache.maven.artifact.Artifact> artifacts)
Filter the marked dependencies
|
protected org.apache.maven.shared.transfer.artifact.resolve.ArtifactResolver |
getArtifactResolver() |
protected DependencyStatusSets |
getClassifierTranslatedDependencies(Set<org.apache.maven.artifact.Artifact> artifacts,
boolean stopOnFailure)
Transform artifacts
|
protected org.apache.maven.shared.transfer.dependencies.resolve.DependencyResolver |
getDependencyResolver() |
protected DependencyStatusSets |
getDependencySets(boolean stopOnFailure) |
protected DependencyStatusSets |
getDependencySets(boolean stopOnFailure,
boolean includeParents)
Method creates filters and filters the projects dependencies.
|
protected abstract org.apache.maven.shared.artifact.filter.collection.ArtifactsFilter |
getMarkedArtifactFilter()
Return an
ArtifactsFilter indicating which artifacts must be filtered out. |
File |
getMarkersDirectory() |
protected org.apache.maven.shared.transfer.repository.RepositoryManager |
getRepositoryManager() |
protected Set<org.apache.maven.artifact.Artifact> |
getResolvedDependencies(boolean stopOnFailure)
Retrieves dependencies, either direct only or all including transitive.
|
boolean |
isPrependGroupId() |
protected Set<org.apache.maven.artifact.Artifact> |
resolve(Set<org.apache.maven.shared.transfer.artifact.ArtifactCoordinate> coordinates,
boolean stopOnFailure) |
void |
setMarkersDirectory(File theMarkersDirectory) |
void |
setPrependGroupId(boolean prependGroupId) |
copyFile, doExecute, execute, getProject, isSilent, isSkip, newResolveArtifactProjectBuildingRequest, newResolvePluginProjectBuildingRequest, setSilent, setSkip
@Parameter(property="overWriteReleases", defaultValue="false") protected boolean overWriteReleases
@Parameter(property="overWriteSnapshots", defaultValue="false") protected boolean overWriteSnapshots
@Parameter(property="overWriteIfNewer", defaultValue="true") protected boolean overWriteIfNewer
@Parameter(property="excludeTransitive", defaultValue="false") protected boolean excludeTransitive
@Parameter(property="includeTypes", defaultValue="") protected String includeTypes
@Parameter(property="excludeTypes", defaultValue="") protected String excludeTypes
@Parameter(property="includeScope", defaultValue="") protected String includeScope
runtime
include scope gives runtime and compile dependencies,compile
include scope gives compile, provided, and system dependencies,test
include scope gives all dependencies (equivalent to default),provided
include scope just gives provided dependencies,system
include scope just gives system dependencies.@Parameter(property="excludeScope", defaultValue="") protected String excludeScope
runtime
exclude scope excludes runtime and compile dependencies,compile
exclude scope excludes compile, provided, and system dependencies,test
exclude scope excludes all dependencies, then not really a legitimate option: it will
fail, you probably meant to configure includeScope = compileprovided
exclude scope just excludes provided dependencies,system
exclude scope just excludes system dependencies.@Parameter(property="includeClassifiers", defaultValue="") protected String includeClassifiers
@Parameter(property="excludeClassifiers", defaultValue="") protected String excludeClassifiers
@Parameter(property="classifier", defaultValue="") protected String classifier
@Parameter(property="type", defaultValue="") protected String type
@Parameter(property="excludeArtifactIds", defaultValue="") protected String excludeArtifactIds
@Parameter(property="includeArtifactIds", defaultValue="") protected String includeArtifactIds
@Parameter(property="excludeGroupIds", defaultValue="") protected String excludeGroupIds
@Parameter(property="includeGroupIds", defaultValue="") protected String includeGroupIds
@Parameter(property="markersDirectory", defaultValue="${project.build.directory}/dependency-maven-plugin-markers") protected File markersDirectory
@Parameter(property="mdep.prependGroupId", defaultValue="false") protected boolean prependGroupId
protected abstract org.apache.maven.shared.artifact.filter.collection.ArtifactsFilter getMarkedArtifactFilter()
ArtifactsFilter
indicating which artifacts must be filtered out.ArtifactsFilter
indicating which artifacts must be filtered out.protected Set<org.apache.maven.artifact.Artifact> getResolvedDependencies(boolean stopOnFailure) throws org.apache.maven.plugin.MojoExecutionException
stopOnFailure
- true to fail if resolution does not work or false not to fail.org.apache.maven.plugin.MojoExecutionException
- in case of errors.protected DependencyStatusSets getDependencySets(boolean stopOnFailure) throws org.apache.maven.plugin.MojoExecutionException
stopOnFailure
- true/false.DependencyStatusSets
org.apache.maven.plugin.MojoExecutionException
- in case of an error.protected DependencyStatusSets getDependencySets(boolean stopOnFailure, boolean includeParents) throws org.apache.maven.plugin.MojoExecutionException
stopOnFailure
- true to fail if artifacts can't be resolved false otherwise.includeParents
- true
if parents should be included or not false
.org.apache.maven.plugin.MojoExecutionException
- in case of errors.protected DependencyStatusSets getClassifierTranslatedDependencies(Set<org.apache.maven.artifact.Artifact> artifacts, boolean stopOnFailure) throws org.apache.maven.plugin.MojoExecutionException
artifacts
- set of artifacts Artifact
.stopOnFailure
- true/false.org.apache.maven.plugin.MojoExecutionException
- in case of an error.protected DependencyStatusSets filterMarkedDependencies(Set<org.apache.maven.artifact.Artifact> artifacts) throws org.apache.maven.plugin.MojoExecutionException
artifacts
- The artifacts set Artifact
.DependencyStatusSets
.org.apache.maven.plugin.MojoExecutionException
- in case of an error.protected Set<org.apache.maven.artifact.Artifact> resolve(Set<org.apache.maven.shared.transfer.artifact.ArtifactCoordinate> coordinates, boolean stopOnFailure) throws org.apache.maven.plugin.MojoExecutionException
coordinates
- The set of artifact coordinatesArtifactCoordinate
.stopOnFailure
- true
if we should fail with exception if an artifact couldn't be resolved
false
otherwise.Artifact
.org.apache.maven.plugin.MojoExecutionException
- in case of error.public File getMarkersDirectory()
public void setMarkersDirectory(File theMarkersDirectory)
theMarkersDirectory
- The markersDirectory to set.public boolean isPrependGroupId()
public void setPrependGroupId(boolean prependGroupId)
prependGroupId
- - true if the groupId must be prepended during the copy.protected final org.apache.maven.shared.transfer.artifact.resolve.ArtifactResolver getArtifactResolver()
artifactResolver
protected final org.apache.maven.shared.transfer.dependencies.resolve.DependencyResolver getDependencyResolver()
dependencyResolver
protected final org.apache.maven.shared.transfer.repository.RepositoryManager getRepositoryManager()
repositoryManager
Copyright © 2002–2023 The Apache Software Foundation. All rights reserved.