public class RequireReleaseDeps extends AbstractBanDependencies
Modifier and Type | Field and Description |
---|---|
List<String> |
excludes
Dependencies to ignore when checking for release versions.
|
boolean |
failWhenParentIsSnapshot
Allows this rule to fail when the parent is defined as a snapshot.
|
List<String> |
includes
Dependencies to include when checking for release versions.
|
boolean |
onlyWhenRelease
Allows this rule to execute only when this project is a release.
|
message
Constructor and Description |
---|
RequireReleaseDeps() |
Modifier and Type | Method and 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) |
boolean |
isFailWhenParentIsSnapshot() |
boolean |
isOnlyWhenRelease() |
void |
setFailWhenParentIsSnapshot(boolean failWhenParentIsSnapshot) |
void |
setOnlyWhenRelease(boolean onlyWhenRelease) |
getDependenciesToCheck, getErrorMessage, getMessage, isSearchTransitive, setMessage, setSearchTransitive
getCacheId, isCacheable, isResultValid
public boolean onlyWhenRelease
public boolean failWhenParentIsSnapshot
public List<String> excludes
public void execute(EnforcerRuleHelper helper) throws EnforcerRuleException
execute
in interface EnforcerRule
execute
in class AbstractBanDependencies
helper
- the helperEnforcerRuleException
- the enforcer rule exceptionprotected Set<org.apache.maven.artifact.Artifact> checkDependencies(Set<org.apache.maven.artifact.Artifact> dependencies, org.apache.maven.plugin.logging.Log log) throws EnforcerRuleException
checkDependencies
in class AbstractBanDependencies
dependencies
- the dependencieslog
- the logEnforcerRuleException
- the enforcer rule exceptionpublic Set<org.apache.maven.artifact.Artifact> filterArtifacts(Set<org.apache.maven.artifact.Artifact> dependencies)
public boolean isOnlyWhenRelease()
public void setOnlyWhenRelease(boolean onlyWhenRelease)
public boolean isFailWhenParentIsSnapshot()
public void setFailWhenParentIsSnapshot(boolean failWhenParentIsSnapshot)
Copyright © 2007-2014 The Apache Software Foundation. All Rights Reserved.