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
,EnforcerRule2
public class RequireReleaseDeps extends AbstractBanDependencies
This rule checks that no snapshots are included.- Version:
- $Id: RequireReleaseDeps.java 1697215 2015-08-23 16:27:17Z khmarbaise $
- Author:
- Brian Fox
-
-
Constructor Summary
Constructors Constructor Description RequireReleaseDeps()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected Set<org.apache.maven.artifact.Artifact>
checkDependencies(Set<org.apache.maven.artifact.Artifact> dependencies, org.apache.maven.plugin.logging.Log log)
Checks the set of dependencies against the list of excludes.void
execute(EnforcerRuleHelper helper)
Override parent to allow optional ignore of this rule.Set<org.apache.maven.artifact.Artifact>
filterArtifacts(Set<org.apache.maven.artifact.Artifact> dependencies)
List<String>
getExcludes()
List<String>
getIncludes()
boolean
isFailWhenParentIsSnapshot()
boolean
isOnlyWhenRelease()
void
setExcludes(List<String> excludes)
void
setFailWhenParentIsSnapshot(boolean failWhenParentIsSnapshot)
void
setIncludes(List<String> includes)
void
setOnlyWhenRelease(boolean onlyWhenRelease)
-
Methods inherited from class org.apache.maven.plugins.enforcer.AbstractBanDependencies
getDependenciesToCheck, getErrorMessage, isSearchTransitive, setSearchTransitive
-
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
-
execute
public void execute(EnforcerRuleHelper helper) throws EnforcerRuleException
Override parent to allow optional ignore of this rule.- Specified by:
execute
in interfaceEnforcerRule
- Overrides:
execute
in classAbstractBanDependencies
- Parameters:
helper
- the enforcerRuleHelper- Throws:
EnforcerRuleException
- when an exception occurs
-
checkDependencies
protected Set<org.apache.maven.artifact.Artifact> checkDependencies(Set<org.apache.maven.artifact.Artifact> dependencies, org.apache.maven.plugin.logging.Log log) throws EnforcerRuleException
Checks the set of dependencies against the list of excludes.- Specified by:
checkDependencies
in classAbstractBanDependencies
- Parameters:
dependencies
- the dependencieslog
- the log- Returns:
- the sets the
- Throws:
EnforcerRuleException
- the enforcer rule exception
-
filterArtifacts
public Set<org.apache.maven.artifact.Artifact> filterArtifacts(Set<org.apache.maven.artifact.Artifact> dependencies)
-
isOnlyWhenRelease
public final boolean isOnlyWhenRelease()
-
setOnlyWhenRelease
public final void setOnlyWhenRelease(boolean onlyWhenRelease)
-
isFailWhenParentIsSnapshot
public final boolean isFailWhenParentIsSnapshot()
-
setFailWhenParentIsSnapshot
public final void setFailWhenParentIsSnapshot(boolean failWhenParentIsSnapshot)
-
-