org.apache.maven.plugins.enforcer
Class RequireReleaseDeps
java.lang.Object
org.apache.maven.plugins.enforcer.AbstractStandardEnforcerRule
org.apache.maven.plugins.enforcer.AbstractNonCacheableEnforcerRule
org.apache.maven.plugins.enforcer.AbstractBanDependencies
org.apache.maven.plugins.enforcer.RequireReleaseDeps
- All Implemented Interfaces:
- EnforcerRule
public class RequireReleaseDeps
- extends AbstractBanDependencies
This rule checks that no snapshots are included.
- Version:
- $Id: RequireReleaseDeps.java 683054 2008-08-06 00:13:22Z brianf $
- Author:
- Brian Fox
Field Summary |
boolean |
failWhenParentIsSnapshot
Allows this rule to fail when the parent is defined as a snapshot. |
boolean |
onlyWhenRelease
Allows this rule to execute only when this project is a release. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
onlyWhenRelease
public boolean onlyWhenRelease
- Allows this rule to execute only when this project is a release.
- Is defined by:
failWhenParentIsSnapshot
public boolean failWhenParentIsSnapshot
- Allows this rule to fail when the parent is defined as a snapshot.
- Is defined by:
RequireReleaseDeps
public RequireReleaseDeps()
execute
public void execute(EnforcerRuleHelper helper)
throws EnforcerRuleException
- Override parent to allow optional ignore of this rule.
- Specified by:
execute
in interface EnforcerRule
- Overrides:
execute
in class AbstractBanDependencies
- Parameters:
helper
- the helper
- Throws:
EnforcerRuleException
- the enforcer rule exception
checkDependencies
protected java.util.Set checkDependencies(java.util.Set dependencies,
org.apache.maven.plugin.logging.Log log)
throws EnforcerRuleException
- Checks the set of dependencies to see if any snapshots are included
- Specified by:
checkDependencies
in class AbstractBanDependencies
- Parameters:
dependencies
- the dependencieslog
- the log
- Returns:
- the sets the
- Throws:
EnforcerRuleException
- the enforcer rule exception
isOnlyWhenRelease
public boolean isOnlyWhenRelease()
setOnlyWhenRelease
public void setOnlyWhenRelease(boolean onlyWhenRelease)
isFailWhenParentIsSnapshot
public boolean isFailWhenParentIsSnapshot()
setFailWhenParentIsSnapshot
public void setFailWhenParentIsSnapshot(boolean failWhenParentIsSnapshot)
Copyright © 2007-2011 Apache Software Foundation. All Rights Reserved.