Class RequireTextFileChecksum
java.lang.Object
org.apache.maven.enforcer.rule.api.AbstractEnforcerRuleBase
org.apache.maven.enforcer.rule.api.AbstractEnforcerRule
org.apache.maven.enforcer.rules.AbstractStandardEnforcerRule
org.apache.maven.enforcer.rules.checksum.RequireFileChecksum
org.apache.maven.enforcer.rules.checksum.RequireTextFileChecksum
- All Implemented Interfaces:
EnforcerRuleBase
@Named("requireTextFileChecksum")
public final class RequireTextFileChecksum
extends RequireFileChecksum
Rule to validate a text file to match the specified checksum.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate Charsetprivate final org.apache.maven.project.MavenProject -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected Stringvoidexecute()This is the interface into the rule.voidsetEncoding(String encoding) voidsetNormalizeLineSeparatorTo(NormalizeLineSeparatorReader.LineSeparator normalizeLineSeparatorTo) toString()Methods inherited from class RequireFileChecksum
calculateChecksum, getChecksum, getFile, getNonexistentFileMessage, getType, setChecksum, setFile, setNonexistentFileMessage, setTypeMethods inherited from class AbstractStandardEnforcerRule
formatLocation, getMessage, setMessageMethods inherited from class AbstractEnforcerRule
getCacheId, getLevel, getRuleNameMethods inherited from class AbstractEnforcerRuleBase
getLog, setLog
-
Field Details
-
normalizeLineSeparatorTo
-
encoding
-
project
private final org.apache.maven.project.MavenProject project
-
-
Constructor Details
-
RequireTextFileChecksum
@Inject public RequireTextFileChecksum(org.apache.maven.project.MavenProject project)
-
-
Method Details
-
setNormalizeLineSeparatorTo
public void setNormalizeLineSeparatorTo(NormalizeLineSeparatorReader.LineSeparator normalizeLineSeparatorTo) -
setEncoding
-
getEncoding
-
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.- Overrides:
executein classRequireFileChecksum- Throws:
EnforcerRuleException- the enforcer rule exception
-
calculateChecksum
- Overrides:
calculateChecksumin classRequireFileChecksum- Throws:
EnforcerRuleException
-
toString
- Overrides:
toStringin classRequireFileChecksum
-