org.apache.maven.plugins.enforcer
Class AbstractBanDependencies

java.lang.Object
  extended by org.apache.maven.plugins.enforcer.AbstractStandardEnforcerRule
      extended by org.apache.maven.plugins.enforcer.AbstractNonCacheableEnforcerRule
          extended by org.apache.maven.plugins.enforcer.AbstractBanDependencies
All Implemented Interfaces:
EnforcerRule
Direct Known Subclasses:
BannedDependencies, NoSnapshots, RequireReleaseDeps

public abstract class AbstractBanDependencies
extends AbstractNonCacheableEnforcerRule

Abstract Rule for banning dependencies.

Version:
$Id: AbstractBanDependencies.java 1495697 2013-06-22 10:05:58Z rfscholte $
Author:
Brian Fox

Field Summary
 
Fields inherited from class org.apache.maven.plugins.enforcer.AbstractStandardEnforcerRule
message
 
Constructor Summary
AbstractBanDependencies()
           
 
Method Summary
protected abstract  Set<Artifact> checkDependencies(Set<Artifact> dependencies, Log log)
          Checks the set of dependencies against the list of excludes.
 void execute(EnforcerRuleHelper helper)
          Execute the rule.
protected  Set<Artifact> getDependenciesToCheck(MavenProject project)
           
protected  CharSequence getErrorMessage(Artifact artifact)
           
 boolean isSearchTransitive()
          Checks if is search transitive.
 void setSearchTransitive(boolean theSearchTransitive)
          Sets the search transitive.
 
Methods inherited from class org.apache.maven.plugins.enforcer.AbstractNonCacheableEnforcerRule
getCacheId, isCacheable, isResultValid
 
Methods inherited from class org.apache.maven.plugins.enforcer.AbstractStandardEnforcerRule
getMessage, setMessage
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractBanDependencies

public AbstractBanDependencies()
Method Detail

execute

public void execute(EnforcerRuleHelper helper)
             throws EnforcerRuleException
Execute the rule.

Parameters:
helper - the helper
Throws:
EnforcerRuleException - the enforcer rule exception

getErrorMessage

protected CharSequence getErrorMessage(Artifact artifact)

getDependenciesToCheck

protected Set<Artifact> getDependenciesToCheck(MavenProject project)

checkDependencies

protected abstract Set<Artifact> checkDependencies(Set<Artifact> dependencies,
                                                   Log log)
                                            throws EnforcerRuleException
Checks the set of dependencies against the list of excludes.

Parameters:
dependencies - the dependencies
log - the log
Returns:
the sets the
Throws:
EnforcerRuleException - the enforcer rule exception

isSearchTransitive

public boolean isSearchTransitive()
Checks if is search transitive.

Returns:
the searchTransitive

setSearchTransitive

public void setSearchTransitive(boolean theSearchTransitive)
Sets the search transitive.

Parameters:
theSearchTransitive - the searchTransitive to set


Copyright © 2007–2013 The Apache Software Foundation. All rights reserved.