Package org.springframework.boot.maven
Class DependencyFilter
- java.lang.Object
- org.apache.maven.shared.artifact.filter.collection.AbstractArtifactsFilter
- org.springframework.boot.maven.DependencyFilter
- All Implemented Interfaces:
org.apache.maven.shared.artifact.filter.collection.ArtifactsFilter
- Direct Known Subclasses:
ExcludeFilter
,IncludeFilter
public abstract class DependencyFilter extends org.apache.maven.shared.artifact.filter.collection.AbstractArtifactsFilter
Base class forArtifactsFilter
based on aFilterableDependency
list.- Since:
- 1.2
Constructor Summary
Constructors Constructor Description DependencyFilter(List<? extends org.springframework.boot.maven.FilterableDependency> dependencies)
Create a new instance with the list ofFilterableDependency
instance(s) to use.
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected boolean
equals(org.apache.maven.artifact.Artifact artifact, org.springframework.boot.maven.FilterableDependency dependency)
Check if the specifiedArtifact
matches the specifiedFilterableDependency
.Set
filter(Set artifacts)
protected abstract boolean
filter(org.apache.maven.artifact.Artifact artifact)
protected List<? extends org.springframework.boot.maven.FilterableDependency>
getFilters()
Constructor Detail
DependencyFilter
public DependencyFilter(List<? extends org.springframework.boot.maven.FilterableDependency> dependencies)
Create a new instance with the list ofFilterableDependency
instance(s) to use.- Parameters:
dependencies
- the source dependencies
Method Detail
filter
public Set filter(Set artifacts) throws org.apache.maven.shared.artifact.filter.collection.ArtifactFilterException
- Throws:
org.apache.maven.shared.artifact.filter.collection.ArtifactFilterException
filter
protected abstract boolean filter(org.apache.maven.artifact.Artifact artifact)
equals
protected final boolean equals(org.apache.maven.artifact.Artifact artifact, org.springframework.boot.maven.FilterableDependency dependency)
Check if the specifiedArtifact
matches the specifiedFilterableDependency
. Returnstrue
if it should be excluded- Parameters:
artifact
- the MavenArtifact
dependency
- theFilterableDependency
- Returns:
true
if the artifact matches the dependency
getFilters
protected final List<? extends org.springframework.boot.maven.FilterableDependency> getFilters()