public class RequireSnapshotVersion extends AbstractNonCacheableEnforcerRule
Modifier and Type | Field and Description |
---|---|
private boolean |
failWhenParentIsRelease
Allows this rule to fail when the parent is defined as a release.
|
Constructor and Description |
---|
RequireSnapshotVersion() |
Modifier and Type | Method and Description |
---|---|
void |
execute(EnforcerRuleHelper helper)
This is the interface into the rule.
|
private org.apache.maven.project.MavenProject |
getProject(EnforcerRuleHelper helper) |
boolean |
isFailWhenParentIsRelease() |
void |
setFailWhenParentIsRelease(boolean failWhenParentIsRelease) |
getCacheId, isCacheable, isResultValid
getLevel, getMessage, setLevel, setMessage
private boolean failWhenParentIsRelease
public void execute(EnforcerRuleHelper helper) throws EnforcerRuleException
EnforcerRule
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.EnforcerRuleException
- the enforcer rule exceptionprivate org.apache.maven.project.MavenProject getProject(EnforcerRuleHelper helper) throws EnforcerRuleException
EnforcerRuleException
public boolean isFailWhenParentIsRelease()
public void setFailWhenParentIsRelease(boolean failWhenParentIsRelease)