Class RequireFilesDontExist
java.lang.Object
org.apache.maven.enforcer.rule.api.AbstractEnforcerRule
org.apache.maven.enforcer.rules.AbstractStandardEnforcerRule
org.apache.maven.enforcer.rules.files.RequireFilesDontExist
- All Implemented Interfaces:
EnforcerRuleBase
@Named("requireFilesDontExist")
public final class RequireFilesDontExist
extends AbstractStandardEnforcerRule
The Class RequireFilesDontExist.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidexecute()This is the interface into the rule.If the rule is to be cached during session scope, whole executing of Maven build, this id is used as part of the key.getLog()Provide anEnforcerLoggerinstance for RulevoidsetLog(EnforcerLogger log) Used byEnforcerMojoto inject logger instancetoString()Methods inherited from class org.apache.maven.enforcer.rules.AbstractStandardEnforcerRule
formatLocation, getMessage, setMessageMethods inherited from class org.apache.maven.enforcer.rule.api.AbstractEnforcerRule
getLevel
-
Constructor Details
-
RequireFilesDontExist
public RequireFilesDontExist()
-
-
Method Details
-
execute
Description copied from class:AbstractEnforcerRuleThis is the interface into the rule. This method should throw an exception containing a reason message if the rule fails the check. The plugin will then decide based on the fail flag and rule level if it should stop or just log the message as a warning.- Specified by:
executein classAbstractEnforcerRule- Throws:
EnforcerRuleException- the enforcer rule exception
-
getCacheId
Description copied from class:AbstractEnforcerRuleIf the rule is to be cached during session scope, whole executing of Maven build, this id is used as part of the key.Rule of the same class and the same cache id will be executed once.
- Overrides:
getCacheIdin classAbstractEnforcerRule- Returns:
- id to be used by the Enforcer to determine uniqueness of cache results.
Return
nulldisable cache of rule executing.
-
toString
-
setLog
Used byEnforcerMojoto inject logger instance- Specified by:
setLogin interfaceEnforcerRuleBase- Parameters:
log- anEnforcerLoggerinstance
-
getLog
Provide anEnforcerLoggerinstance for RuleNOTICE A logger is not available in constructors.
- Returns:
- an
EnforcerLoggerinstance
-