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 Charset
private final org.apache.maven.project.MavenProject
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected String
void
execute()
This is the interface into the rule.void
setEncoding
(String encoding) void
setNormalizeLineSeparatorTo
(NormalizeLineSeparatorReader.LineSeparator normalizeLineSeparatorTo) toString()
Methods inherited from class org.apache.maven.enforcer.rules.checksum.RequireFileChecksum
calculateChecksum, getChecksum, getFile, getNonexistentFileMessage, getType, setChecksum, setFile, setNonexistentFileMessage, setType
Methods inherited from class org.apache.maven.enforcer.rules.AbstractStandardEnforcerRule
formatLocation, getMessage, setMessage
Methods inherited from class org.apache.maven.enforcer.rule.api.AbstractEnforcerRule
getCacheId, getLevel
Methods inherited from class org.apache.maven.enforcer.rule.api.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:AbstractEnforcerRule
This 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:
execute
in classRequireFileChecksum
- Throws:
EnforcerRuleException
- the enforcer rule exception
-
calculateChecksum
- Overrides:
calculateChecksum
in classRequireFileChecksum
- Throws:
EnforcerRuleException
-
toString
- Overrides:
toString
in classRequireFileChecksum
-