public class BannedDependencies extends AbstractBanDependencies
Modifier and Type | Field and Description |
---|---|
List |
excludes
Specify the banned dependencies.
|
List |
includes
Specify the allowed dependencies.
|
message
Constructor and Description |
---|
BannedDependencies() |
Modifier and Type | Method and Description |
---|---|
protected Set |
checkDependencies(Set 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 |
getExcludes()
Gets the excludes.
|
List |
getIncludes()
Gets the includes.
|
void |
setExcludes(List theExcludes)
Sets the excludes.
|
void |
setIncludes(List theIncludes)
Sets the includes.
|
execute, getDependenciesToCheck, getErrorMessage, getMessage, isSearchTransitive, setMessage, setSearchTransitive
getCacheId, isCacheable, isResultValid
public List excludes
groupId[:artifactId][:version]
.
Any of the sections can be a wildcard by using '*' (ie group:*:1.0) public List includes
groupId[:artifactId][:version]
.
Any of the sections can be a wildcard by using '*' (ie group:*:1.0) protected Set checkDependencies(Set theDependencies, org.apache.maven.plugin.logging.Log log) throws EnforcerRuleException
AbstractBanDependencies
checkDependencies
in class AbstractBanDependencies
theDependencies
- 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 List getExcludes()
public void setExcludes(List theExcludes)
theExcludes
- the excludes to setpublic List getIncludes()
public void setIncludes(List theIncludes)
theIncludes
- the includes to setCopyright © 2007-2012 Apache Software Foundation. All Rights Reserved.