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
Direct Known Subclasses:
BannedDependencies, NoSnapshots, RequireReleaseDeps

public abstract class AbstractBanDependencies
extends AbstractNonCacheableEnforcerRule

Abstract Rule for banning dependencies.

Version:
$Id: AbstractBanDependencies.java 1345332 2012-06-01 20:14:13Z 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)
           
 String getMessage()
          Gets the message.
 boolean isSearchTransitive()
          Checks if is search transitive.
 void setMessage(String theMessage)
          Sets the message.
 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 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

getMessage

public String getMessage()
Gets the message.

Returns:
the message

setMessage

public void setMessage(String theMessage)
Sets the message.

Parameters:
theMessage - the message to set

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-2012 The Apache Software Foundation. All Rights Reserved.