public class BannedDependencies extends AbstractBanDependencies
| Modifier and Type | Field and Description |
|---|---|
List<String> |
excludes
Specify the banned dependencies.
|
List<String> |
includes
Specify the allowed dependencies.
|
message| Constructor and Description |
|---|
BannedDependencies() |
| Modifier and Type | Method and 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 parsed array of substrings against the artifact.
|
List<String> |
getExcludes()
Gets the excludes.
|
List<String> |
getIncludes()
Gets the includes.
|
void |
setExcludes(List<String> theExcludes)
Sets the excludes.
|
void |
setIncludes(List<String> theIncludes)
Sets the includes.
|
execute, getDependenciesToCheck, getErrorMessage, getMessage, isSearchTransitive, setMessage, setSearchTransitivegetCacheId, isCacheable, isResultValidpublic List<String> excludes
groupId[:artifactId][:version].
Any of the sections can be a wildcard by using '*' (ie group:*:1.0) public List<String> includes
groupId[:artifactId][:version].
Any of the sections can be a wildcard by using '*' (ie group:*:1.0) protected 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
pattern - the array of patternsartifact - the artifacttrue if the artifact matches one of the patternsEnforcerRuleException - the enforcer rule exceptionpublic void setExcludes(List<String> theExcludes)
theExcludes - the excludes to setCopyright © 2007-2016 The Apache Software Foundation. All Rights Reserved.