Class RequireNoRepositories
- java.lang.Object
-
- org.apache.maven.plugins.enforcer.AbstractStandardEnforcerRule
-
- org.apache.maven.plugins.enforcer.AbstractNonCacheableEnforcerRule
-
- org.apache.maven.plugins.enforcer.RequireNoRepositories
-
- All Implemented Interfaces:
EnforcerRule
,EnforcerRule2
public class RequireNoRepositories extends AbstractNonCacheableEnforcerRule
This rule checks that this pom or its parents don't define a repository.- Author:
- Brian Fox
-
-
Constructor Summary
Constructors Constructor Description RequireNoRepositories()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
execute(EnforcerRuleHelper helper)
This is the interface into the rule.void
setAllowedPluginRepositories(List<String> allowedPluginRepositories)
void
setAllowedRepositories(List<String> allowedRepositories)
void
setAllowSnapshotPluginRepositories(boolean allowSnapshotPluginRepositories)
void
setAllowSnapshotRepositories(boolean allowSnapshotRepositories)
void
setBanPluginRepositories(boolean banPluginRepositories)
void
setBanRepositories(boolean banRepositories)
-
Methods inherited from class org.apache.maven.plugins.enforcer.AbstractNonCacheableEnforcerRule
getCacheId, isCacheable, isResultValid
-
Methods inherited from class org.apache.maven.plugins.enforcer.AbstractStandardEnforcerRule
getLevel, getMessage, setLevel, setMessage
-
-
-
-
Method Detail
-
setBanRepositories
public final void setBanRepositories(boolean banRepositories)
-
setBanPluginRepositories
public final void setBanPluginRepositories(boolean banPluginRepositories)
-
setAllowedPluginRepositories
public final void setAllowedPluginRepositories(List<String> allowedPluginRepositories)
-
setAllowSnapshotRepositories
public final void setAllowSnapshotRepositories(boolean allowSnapshotRepositories)
-
setAllowSnapshotPluginRepositories
public final void setAllowSnapshotPluginRepositories(boolean allowSnapshotPluginRepositories)
-
execute
public void execute(EnforcerRuleHelper helper) throws EnforcerRuleException
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 if it should stop or just log the message as a warning.- Parameters:
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.- Throws:
EnforcerRuleException
- the enforcer rule exception
-
-