EnforcerRule, EnforcerRule2BannedPluginspublic class BannedDependencies extends AbstractBanDependencies
| Constructor | Description |
|---|---|
BannedDependencies() |
| Modifier and Type | Method | Description |
|---|---|---|
protected Set<org.apache.maven.artifact.Artifact> |
checkDependencies(Set<org.apache.maven.artifact.Artifact> theDependencies,
org.apache.maven.plugin.logging.Log log) |
Checks the set of dependencies against the list of excludes.
|
protected boolean |
compareDependency(String pattern,
org.apache.maven.artifact.Artifact artifact) |
Compares the given pattern against the given artifact.
|
List<String> |
getExcludes() |
Gets the excludes.
|
List<String> |
getIncludes() |
Gets the includes.
|
void |
setExcludes(List<String> theExcludes) |
Specify the banned dependencies.
|
void |
setIncludes(List<String> theIncludes) |
Specify the allowed dependencies.
|
execute, getDependenciesToCheck, getErrorMessage, isSearchTransitive, setSearchTransitivegetCacheId, isCacheable, isResultValidgetLevel, getMessage, setLevel, setMessageprotected Set<org.apache.maven.artifact.Artifact> checkDependencies(Set<org.apache.maven.artifact.Artifact> theDependencies, org.apache.maven.plugin.logging.Log log) throws EnforcerRuleException
checkDependencies in class AbstractBanDependenciestheDependencies - the dependencieslog - the logEnforcerRuleException - the enforcer rule exceptionprotected boolean compareDependency(String pattern, org.apache.maven.artifact.Artifact artifact) throws EnforcerRuleException
groupId:artifactId:version:type:scope:classifier.pattern - The pattern to compare the artifact with.artifact - the artifacttrue if the artifact matches one of the patternsEnforcerRuleException - the enforcer rule exceptionpublic void setExcludes(List<String> theExcludes)
groupId[:artifactId][:version]. Any of the sections can be a wildcard
by using '*' (ie group:*:1.0) theExcludes - the excludes to setgetExcludes()public void setIncludes(List<String> theIncludes)
groupId[:artifactId][:version]. Any of the sections can be a wildcard
by using '*' (ie group:*:1.0) theIncludes - the includes to setsetIncludes(List)Copyright © 2007–2019 The Apache Software Foundation. All rights reserved.