Class RequireTextFileChecksum
java.lang.Object
org.apache.maven.plugins.enforcer.AbstractStandardEnforcerRule
org.apache.maven.plugins.enforcer.AbstractNonCacheableEnforcerRule
org.apache.maven.plugins.enforcer.RequireFileChecksum
org.apache.maven.plugins.enforcer.RequireTextFileChecksum
- All Implemented Interfaces:
EnforcerRule,EnforcerRule2
Rule to validate a text file to match the specified checksum.
- See Also:
-
Field Summary
FieldsFields inherited from class org.apache.maven.plugins.enforcer.RequireFileChecksum
file -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected Stringvoidexecute(EnforcerRuleHelper helper) This is the interface into the rule.voidsetEncoding(String encoding) voidsetNormalizeLineSeparatorTo(NormalizeLineSeparatorReader.LineSeparator normalizeLineSeparatorTo) Methods inherited from class org.apache.maven.plugins.enforcer.RequireFileChecksum
calculateChecksum, setChecksum, setFile, setNonexistentFileMessage, setTypeMethods inherited from class org.apache.maven.plugins.enforcer.AbstractNonCacheableEnforcerRule
getCacheId, isCacheable, isResultValidMethods inherited from class org.apache.maven.plugins.enforcer.AbstractStandardEnforcerRule
getLevel, getMessage, setLevel, setMessage
-
Field Details
-
normalizeLineSeparatorTo
-
encoding
Charset encoding
-
-
Constructor Details
-
RequireTextFileChecksum
public RequireTextFileChecksum()
-
-
Method Details
-
setNormalizeLineSeparatorTo
public void setNormalizeLineSeparatorTo(NormalizeLineSeparatorReader.LineSeparator normalizeLineSeparatorTo) -
setEncoding
-
execute
Description copied from interface:EnforcerRuleThis 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 if it should stop or just log the message as a warning.- Specified by:
executein interfaceEnforcerRule- Overrides:
executein classRequireFileChecksum- Parameters:
helper- The helper provides access to the log, MavenSession and has helpers to get common components. It is also able to lookup components by class name.- Throws:
EnforcerRuleException- the enforcer rule exception
-
calculateChecksum
- Overrides:
calculateChecksumin classRequireFileChecksum- Throws:
EnforcerRuleException
-