|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
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
public class RequireReleaseDeps
This rule checks that no snapshots are included.
Field Summary | |
---|---|
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. |
Fields inherited from class org.apache.maven.plugins.enforcer.AbstractStandardEnforcerRule |
---|
message |
Constructor Summary | |
---|---|
RequireReleaseDeps()
|
Method Summary | |
---|---|
protected Set<Artifact> |
checkDependencies(Set<Artifact> dependencies,
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<Artifact> |
filterArtifacts(Set<Artifact> dependencies)
|
boolean |
isFailWhenParentIsSnapshot()
|
boolean |
isOnlyWhenRelease()
|
void |
setFailWhenParentIsSnapshot(boolean failWhenParentIsSnapshot)
|
void |
setOnlyWhenRelease(boolean onlyWhenRelease)
|
Methods inherited from class org.apache.maven.plugins.enforcer.AbstractBanDependencies |
---|
getDependenciesToCheck, getErrorMessage, getMessage, isSearchTransitive, setMessage, setSearchTransitive |
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 |
---|
public boolean onlyWhenRelease
public boolean failWhenParentIsSnapshot
public List<String> excludes
public List<String> includes
Constructor Detail |
---|
public RequireReleaseDeps()
Method Detail |
---|
public void execute(EnforcerRuleHelper helper) throws EnforcerRuleException
execute
in class AbstractBanDependencies
helper
- the helper
EnforcerRuleException
- the enforcer rule exceptionprotected Set<Artifact> checkDependencies(Set<Artifact> dependencies, Log log) throws EnforcerRuleException
checkDependencies
in class AbstractBanDependencies
dependencies
- the dependencieslog
- the log
EnforcerRuleException
- the enforcer rule exceptionpublic Set<Artifact> filterArtifacts(Set<Artifact> dependencies)
public boolean isOnlyWhenRelease()
public void setOnlyWhenRelease(boolean onlyWhenRelease)
public boolean isFailWhenParentIsSnapshot()
public void setFailWhenParentIsSnapshot(boolean failWhenParentIsSnapshot)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |