public class BannedDependencies extends AbstractBanDependencies
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 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, setSearchTransitive
getCacheId, isCacheable, isResultValid
getLevel, getMessage, setLevel, setMessage
public BannedDependencies()
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 AbstractBanDependencies
theDependencies
- 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 List<String> getExcludes()
public 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 List<String> getIncludes()
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–2015 The Apache Software Foundation. All rights reserved.