org.apache.maven.plugins.enforcer
Class RequireFilesSize
java.lang.Object
org.apache.maven.plugins.enforcer.AbstractStandardEnforcerRule
org.apache.maven.plugins.enforcer.AbstractRequireFiles
org.apache.maven.plugins.enforcer.RequireFilesSize
public class RequireFilesSize
- extends AbstractRequireFiles
Rule to validate the main artifact is within certain size constraints.
- Author:
- brianf, Roman Stumm
Method Summary |
void |
execute(EnforcerRuleHelper helper)
|
boolean |
isCacheable()
This tells the system if the results are cacheable at all. |
boolean |
isResultValid(EnforcerRule cachedRule)
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. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
RequireFilesSize
public RequireFilesSize()
execute
public void execute(EnforcerRuleHelper helper)
throws EnforcerRuleException
- Overrides:
execute
in class AbstractRequireFiles
- Throws:
EnforcerRuleException
isCacheable
public boolean isCacheable()
- Description copied from class:
AbstractRequireFiles
- 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.
- Overrides:
isCacheable
in class AbstractRequireFiles
- Returns:
true
if rule is cacheable
isResultValid
public boolean isResultValid(EnforcerRule cachedRule)
- Description copied from class:
AbstractRequireFiles
- 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.
- Overrides:
isResultValid
in class AbstractRequireFiles
- Parameters:
cachedRule
- the cached rule
- Returns:
true
if the stored results are valid for the same id.
Copyright © 2007-2012 The Apache Software Foundation. All Rights Reserved.