org.apache.maven.plugins.enforcer
Class DependencyConvergence
java.lang.Object
org.apache.maven.plugins.enforcer.DependencyConvergence
public class DependencyConvergence
- extends Object
- Author:
- Rex Hoffman
Method Summary |
void |
execute(EnforcerRuleHelper helper)
|
String |
getCacheId()
If your rule is cacheable, you must return a unique id when parameters or conditions change that would cause the
result to be different. |
boolean |
isCacheable()
This tells the system if the results are cacheable at all. |
boolean |
isResultValid(EnforcerRule arg0)
If the rule is cacheable and the same id is found in the cache, the stored results are passed to this method to
allow double checking of the results. |
void |
setUniqueVersions(boolean uniqueVersions)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DependencyConvergence
public DependencyConvergence()
setUniqueVersions
public void setUniqueVersions(boolean uniqueVersions)
execute
public void execute(EnforcerRuleHelper helper)
throws EnforcerRuleException
- Throws:
EnforcerRuleException
getCacheId
public String getCacheId()
- If your rule is cacheable, you must return a unique id when parameters or conditions change that would cause the
result to be different. Multiple cached results are stored based on their id. The easiest way to do this is to
return a hash computed from the values of your parameters. If your rule is not cacheable, then the result here is
not important, you may return anything.
isCacheable
public boolean isCacheable()
- This tells the system if the results are cacheable at all. Keep in mind that during forked builds and other
things, a given rule may be executed more than once for the same project. This means that even things that change
from project to project may still be cacheable in certain instances.
isResultValid
public boolean isResultValid(EnforcerRule arg0)
- If the rule is cacheable and the same id is found in the cache, the stored results are passed to this method to
allow double checking of the results. Most of the time this can be done by generating unique ids, but sometimes
the results of objects returned by the helper need to be queried. You may for example, store certain objects in
your rule and then query them later.
Copyright © 2007-2012 The Apache Software Foundation. All Rights Reserved.