public class BanDistributionManagement extends AbstractNonCacheableEnforcerRule
distributionManagement
part. This should be by best practice
only defined once. It could happen that you like to check the parent as well. This can be activated by using the
ignoreParent
which is by default turned off (true
) which means not to check the parent.Modifier and Type | Field and Description |
---|---|
private boolean |
allowRepository
Allow using a repository entry in the distributionManagement area.
|
private boolean |
allowSite
Allow site entry in the distributionManagement area.
|
private boolean |
allowSnapshotRepository
Allow snapshotRepository entry in the distributionManagement area.
|
private boolean |
ignoreParent
Deprecated.
|
private org.apache.maven.plugin.logging.Log |
logger |
Constructor and Description |
---|
BanDistributionManagement() |
Modifier and Type | Method and Description |
---|---|
void |
execute(EnforcerRuleHelper helper)
This is the interface into the rule.
|
boolean |
isAllowRepository() |
boolean |
isAllowSite() |
boolean |
isAllowSnapshotRepository() |
boolean |
isIgnoreParent() |
void |
setAllowRepository(boolean allowRepository) |
void |
setAllowSite(boolean allowSite) |
void |
setAllowSnapshotRepository(boolean allowSnapshotRepository) |
void |
setIgnoreParent(boolean ignoreParent) |
getCacheId, isCacheable, isResultValid
getLevel, getMessage, setLevel, setMessage
private boolean ignoreParent
ignoreParent
the parent will be ignored.private boolean allowRepository
private boolean allowSnapshotRepository
private boolean allowSite
private org.apache.maven.plugin.logging.Log logger
public void execute(EnforcerRuleHelper helper) throws EnforcerRuleException
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 exceptionpublic boolean isIgnoreParent()
public void setIgnoreParent(boolean ignoreParent)
public boolean isAllowRepository()
public void setAllowRepository(boolean allowRepository)
public boolean isAllowSnapshotRepository()
public void setAllowSnapshotRepository(boolean allowSnapshotRepository)
public boolean isAllowSite()
public void setAllowSite(boolean allowSite)