Class RequireMavenVersion
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.version.AbstractVersionEnforcer
org.apache.maven.enforcer.rules.version.RequireMavenVersion
- All Implemented Interfaces:
EnforcerRuleBase
@Named("requireMavenVersion")
public final class RequireMavenVersion
extends AbstractVersionEnforcer
This rule checks that the Maven version is allowed.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final org.apache.maven.rtinfo.RuntimeInformation
-
Constructor Summary
ConstructorsConstructorDescriptionRequireMavenVersion
(org.apache.maven.rtinfo.RuntimeInformation runtimeInformation) -
Method Summary
Methods inherited from class org.apache.maven.enforcer.rules.version.AbstractVersionEnforcer
enforceVersion, getCacheId, getVersion, setVersion, toString
Methods inherited from class org.apache.maven.enforcer.rules.AbstractStandardEnforcerRule
formatLocation, getMessage, setMessage
Methods inherited from class org.apache.maven.enforcer.rule.api.AbstractEnforcerRule
getLevel
Methods inherited from class org.apache.maven.enforcer.rule.api.AbstractEnforcerRuleBase
getLog, setLog
-
Field Details
-
runtimeInformation
private final org.apache.maven.rtinfo.RuntimeInformation runtimeInformation
-
-
Constructor Details
-
RequireMavenVersion
@Inject public RequireMavenVersion(org.apache.maven.rtinfo.RuntimeInformation runtimeInformation)
-
-
Method Details
-
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.- Specified by:
execute
in classAbstractEnforcerRule
- Throws:
EnforcerRuleException
- the enforcer rule exception
-
toString
-