org.apache.maven.plugins.enforcer
Class RequireNoRepositories

java.lang.Object
  extended by org.apache.maven.plugins.enforcer.AbstractStandardEnforcerRule
      extended by org.apache.maven.plugins.enforcer.AbstractNonCacheableEnforcerRule
          extended by org.apache.maven.plugins.enforcer.RequireNoRepositories
All Implemented Interfaces:
EnforcerRule

public class RequireNoRepositories
extends AbstractNonCacheableEnforcerRule

This rule checks that this pom or its parents don't define a repository.

Author:
Brian Fox

Field Summary
 java.util.List allowedPluginRepositories
          Specify explicitly allowed plugin repositories.
 java.util.List allowedRepositories
          Specify explicitly allowed non-plugin repositories.
 boolean allowSnapshotPluginRepositories
          Whether to allow plugin repositories which only resolve snapshots.
 boolean allowSnapshotRepositories
          Whether to allow repositories which only resolve snapshots.
 boolean banPluginRepositories
          Whether to ban plugin repositories.
 boolean banRepositories
          Whether to ban non-plugin repositories.
 
Fields inherited from class org.apache.maven.plugins.enforcer.AbstractStandardEnforcerRule
message
 
Constructor Summary
RequireNoRepositories()
           
 
Method Summary
 void execute(EnforcerRuleHelper helper)
          This is the interface into the rule.
 
Methods inherited from class org.apache.maven.plugins.enforcer.AbstractNonCacheableEnforcerRule
getCacheId, isCacheable, isResultValid
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

banRepositories

public boolean banRepositories
Whether to ban non-plugin repositories. By default they are banned.


banPluginRepositories

public boolean banPluginRepositories
Whether to ban plugin repositories. By default they are banned.


allowedRepositories

public java.util.List allowedRepositories
Specify explicitly allowed non-plugin repositories. This is a list of ids.


allowedPluginRepositories

public java.util.List allowedPluginRepositories
Specify explicitly allowed plugin repositories. This is a list of ids.


allowSnapshotRepositories

public boolean allowSnapshotRepositories
Whether to allow repositories which only resolve snapshots. By default they are banned.


allowSnapshotPluginRepositories

public boolean allowSnapshotPluginRepositories
Whether to allow plugin repositories which only resolve snapshots. By default they are banned.

Constructor Detail

RequireNoRepositories

public RequireNoRepositories()
Method Detail

execute

public void execute(EnforcerRuleHelper helper)
             throws EnforcerRuleException
Description copied from interface: EnforcerRule
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


Copyright © 2007-2012 Apache Software Foundation. All Rights Reserved.