@CompileStatic final class ArtifactUtils extends Object
Utility methods for working with Artifacts.
Adapted from org.apache.maven.plugins.enforcer.ArtifactUtils
.
Original author: Robert Scholte
Constructor and description |
---|
ArtifactUtils
() |
Type Params | Return Type | Name and description |
---|---|---|
|
static Set<ResolvedArtifact> |
checkDependencies(Set<ResolvedArtifact> dependencies, List<String> thePatterns) Checks the set of dependencies against the list of patterns. |
|
static boolean |
compareDependency(String pattern, ResolvedArtifact artifact) Compares the given pattern against the given artifact. |
|
static Set<ResolvedArtifact> |
filterDependencies(Set<ResolvedArtifact> dependencies, List<String> thePatterns) Filters the set of dependencies against the list of patterns. |
Checks the set of dependencies against the list of patterns.
thePatterns
- the patternsdependencies
- the dependenciesnull
Compares the given pattern against the given artifact. The pattern should follow the format
groupId:artifactId:version:type:scope:classifier
.
pattern
- The pattern to compare the artifact with.artifact
- the artifacttrue
if the artifact matches one of the patternsFilters the set of dependencies against the list of patterns.
thePatterns
- the patternsdependencies
- the dependencies