Class AbstractArtifactFeatureFilter
java.lang.Object
org.apache.maven.shared.artifact.filter.collection.AbstractArtifactsFilter
org.apache.maven.shared.artifact.filter.collection.AbstractArtifactFeatureFilter
- All Implemented Interfaces:
ArtifactsFilter
- Direct Known Subclasses:
ArtifactIdFilter
,ClassifierFilter
,GroupIdFilter
,TypeFilter
This is the common base class of ClassifierFilter and TypeFilter
- Version:
- $Id: AbstractArtifactFeatureFilter.java 1716978 2015-11-28 14:47:04Z khmarbaise $
- Author:
- Richard van der Hoff
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
compareFeatures
(String lhs, String rhs) Allows Feature comparison to be customizedSet<org.apache.maven.artifact.Artifact>
This function determines if filtering needs to be performed.protected abstract String
getArtifactFeature
(org.apache.maven.artifact.Artifact artifact) Should return the type or classifier of the given artifact, so that we can filter itvoid
setExcludes
(String excludeString) void
setIncludes
(String includeString) Methods inherited from class org.apache.maven.shared.artifact.filter.collection.AbstractArtifactsFilter
isArtifactIncluded
-
Constructor Details
-
AbstractArtifactFeatureFilter
- Parameters:
include
- comma separated list with includes.exclude
- comma separated list with excludes.
-
-
Method Details
-
filter
public Set<org.apache.maven.artifact.Artifact> filter(Set<org.apache.maven.artifact.Artifact> artifacts) This function determines if filtering needs to be performed. Includes are processed before Excludes.- Parameters:
artifacts
- the set of dependencies to filter.- Returns:
- a Set of filtered dependencies.
-
getArtifactFeature
Should return the type or classifier of the given artifact, so that we can filter it- Parameters:
artifact
- artifact to return type or classifier of- Returns:
- type or classifier
-
setExcludes
- Parameters:
excludeString
- comma separated list with excludes.
-
setIncludes
- Parameters:
includeString
- comma separated list with includes.
-
getExcludes
- Returns:
- Returns the excludes.
-
getIncludes
- Returns:
- Returns the includes.
-
compareFeatures
Allows Feature comparison to be customized- Parameters:
lhs
- String artifact's featurerhs
- String feature from exclude or include list- Returns:
- boolean true if features match
-