in enforcer-rules/src/main/java/org/apache/maven/enforcer/rules/BanDistributionManagement.java [115:126]
public void execute(boolean isAllowRepository, boolean isAllowSnapshotRepository, boolean isAllowSite)
throws EnforcerRuleException {
if (hasDistributionManagement()) {
if (!isAllowRepository && hasRepository()) {
throw new EnforcerRuleException("You have defined a repository in distributionManagement.");
} else if (!isAllowSnapshotRepository && hasSnapshotRepository()) {
throw new EnforcerRuleException("You have defined a snapshotRepository in distributionManagement.");
} else if (!isAllowSite && hasSite()) {
throw new EnforcerRuleException("You have defined a site in distributionManagement.");
}
}
}