|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.maven.plugins.enforcer.AbstractStandardEnforcerRule
org.apache.maven.plugins.enforcer.AbstractVersionEnforcer
public abstract class AbstractVersionEnforcer
Contains the common code to compare a version against a version range.
| Field Summary | |
|---|---|
java.lang.String |
version
Specify the required version. |
| Fields inherited from class org.apache.maven.plugins.enforcer.AbstractStandardEnforcerRule |
|---|
message |
| Constructor Summary | |
|---|---|
AbstractVersionEnforcer()
|
|
| Method Summary | |
|---|---|
static boolean |
containsVersion(org.apache.maven.artifact.versioning.VersionRange allowedRange,
org.apache.maven.artifact.versioning.ArtifactVersion theVersion)
Copied from Artifact.VersionRange. |
void |
enforceVersion(org.apache.maven.plugin.logging.Log log,
java.lang.String variableName,
java.lang.String requiredVersionRange,
org.apache.maven.artifact.versioning.ArtifactVersion actualVersion)
Compares the specified version to see if it is allowed by the defined version range. |
java.lang.String |
getCacheId()
|
java.lang.String |
getVersion()
Gets the required version. |
boolean |
isCacheable()
|
boolean |
isResultValid(EnforcerRule theCachedRule)
|
void |
setVersion(java.lang.String theVersion)
Sets the required version. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.apache.maven.enforcer.rule.api.EnforcerRule |
|---|
execute |
| Field Detail |
|---|
public java.lang.String version
2.0.4 Version 2.0.4 and higher (different from Maven meaning)[2.0,2.1) Versions 2.0 (included) to 2.1 (not included)[2.0,2.1] Versions 2.0 to 2.1 (both included)[2.0.5,) Versions 2.0.5 and higher(,2.0.5],[2.1.1,) Versions up to 2.0.5 (included) and 2.1.1 or higher
| Constructor Detail |
|---|
public AbstractVersionEnforcer()
| Method Detail |
|---|
public void enforceVersion(org.apache.maven.plugin.logging.Log log,
java.lang.String variableName,
java.lang.String requiredVersionRange,
org.apache.maven.artifact.versioning.ArtifactVersion actualVersion)
throws EnforcerRuleException
log - the logvariableName - name of variable to use in messages (Example: "Maven" or "Java" etc).requiredVersionRange - range of allowed versions.actualVersion - the version to be checked.
org.apache.maven.plugin.MojoExecutionException - if the version is not allowed.
EnforcerRuleException - the enforcer rule exception
public static boolean containsVersion(org.apache.maven.artifact.versioning.VersionRange allowedRange,
org.apache.maven.artifact.versioning.ArtifactVersion theVersion)
allowedRange - range of allowed versions.theVersion - the version to be checked.
public java.lang.String getCacheId()
public boolean isCacheable()
public boolean isResultValid(EnforcerRule theCachedRule)
public java.lang.String getVersion()
public void setVersion(java.lang.String theVersion)
theVersion - the required version to set
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||