public final class ArtifactMatcher extends Object
BanTransitiveDependencies| Modifier and Type | Class and Description |
|---|---|
static class |
ArtifactMatcher.Pattern |
| Constructor and Description |
|---|
ArtifactMatcher(Collection<String> patterns,
Collection<String> ignorePatterns)
Construct class by providing patterns as strings.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
match(org.apache.maven.artifact.Artifact artifact)
Check if artifact matches patterns.
|
public ArtifactMatcher(Collection<String> patterns, Collection<String> ignorePatterns)
patterns - includesignorePatterns - excludesNullPointerException - if any of the arguments is nullpublic boolean match(org.apache.maven.artifact.Artifact artifact) throws org.apache.maven.artifact.versioning.InvalidVersionSpecificationException
artifact - the artifact to matchtrue if artifact matches any patterns and none of the ignorePatterns, otherwise
falseorg.apache.maven.artifact.versioning.InvalidVersionSpecificationException - if any pattern contains an invalid version rangeCopyright © 2007–2021 The Apache Software Foundation. All rights reserved.