|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.maven.plugins.enforcer.AbstractStandardEnforcerRule org.apache.maven.plugins.enforcer.AbstractNonCacheableEnforcerRule org.apache.maven.plugins.enforcer.AbstractBanDependencies org.apache.maven.plugins.enforcer.BannedDependencies
public class BannedDependencies
This rule checks that lists of dependencies are not included.
Field Summary | |
---|---|
List<String> |
excludes
Specify the banned dependencies. |
List<String> |
includes
Specify the allowed dependencies. |
Fields inherited from class org.apache.maven.plugins.enforcer.AbstractStandardEnforcerRule |
---|
message |
Constructor Summary | |
---|---|
BannedDependencies()
|
Method Summary | |
---|---|
protected Set<Artifact> |
checkDependencies(Set<Artifact> theDependencies,
Log log)
Checks the set of dependencies against the list of excludes. |
protected boolean |
compareDependency(String[] pattern,
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. |
Methods inherited from class org.apache.maven.plugins.enforcer.AbstractBanDependencies |
---|
execute, getDependenciesToCheck, getErrorMessage, getMessage, isSearchTransitive, setMessage, setSearchTransitive |
Methods inherited from class org.apache.maven.plugins.enforcer.AbstractNonCacheableEnforcerRule |
---|
getCacheId, isCacheable, isResultValid |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public 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)
Constructor Detail |
---|
public BannedDependencies()
Method Detail |
---|
protected Set<Artifact> checkDependencies(Set<Artifact> theDependencies, Log log) throws EnforcerRuleException
checkDependencies
in class AbstractBanDependencies
theDependencies
- the dependencieslog
- the log
EnforcerRuleException
- the enforcer rule exceptionprotected boolean compareDependency(String[] pattern, Artifact artifact) throws EnforcerRuleException
pattern
- the array of patternsartifact
- the artifact
true
if the artifact matches one of the patterns
EnforcerRuleException
- the enforcer rule exceptionpublic List<String> getExcludes()
public void setExcludes(List<String> theExcludes)
theExcludes
- the excludes to setpublic List<String> getIncludes()
public void setIncludes(List<String> theIncludes)
theIncludes
- the includes to set
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |