@CompileStatic abstract class AbstractVersionEnforcerRule extends AbstractStandardEnforcerRule
Contains the common code to compare a version against a version range. Examples of valid version values
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 higherorg.apache.maven.plugins.enforcer.AbstractVersionEnforcer.
Original author: Brian Fox | Constructor and description |
|---|
AbstractVersionEnforcerRule
(ObjectFactory objects) |
AbstractVersionEnforcerRule
(ObjectFactory objects, EnforcerPhase[] allowedPhases) |
| Type Params | Return Type | Name and description |
|---|---|---|
|
static boolean |
containsVersion(org.apache.maven.artifact.versioning.VersionRange allowedRange, org.apache.maven.artifact.versioning.ArtifactVersion theVersion)Copied from Artifact.VersionRange. |
| Methods inherited from class | Name |
|---|---|
class AbstractFilteringEnforcerRule |
execute, setPhases |
class AbstractEnforcerRule |
execute, setEnforcerLevel, validate |
Copied from Artifact.VersionRange. This is tweaked to handle singular ranges properly. Currently the default containsVersion method assumes a singular version means allow everything. This method assumes that "2.0.4" == "[2.0.4,)"
allowedRange - range of allowed versions.theVersion - the version to be checked.Groovy Documentation