Package org.basepom.mojo.dvc.strategy
Class DefaultVersionStrategy
java.lang.Object
org.basepom.mojo.dvc.strategy.DefaultVersionStrategy
- All Implemented Interfaces:
Strategy
This is the default versioning strategy used by previous versions of the plugin. It assumes that all smaller versions are compatible when replaced with
larger numbers and compares version elements from left to right. E.g. 3.2.1 > 3.2 and 2.1.1 > 1.0. Usually works pretty ok.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetName()
final boolean
isCompatible
(org.apache.maven.artifact.versioning.ComparableVersion expectedVersion, org.apache.maven.artifact.versioning.ComparableVersion resolvedVersion)
-
Constructor Details
-
DefaultVersionStrategy
public DefaultVersionStrategy()
-
-
Method Details
-
getName
-
isCompatible
public final boolean isCompatible(org.apache.maven.artifact.versioning.ComparableVersion expectedVersion, org.apache.maven.artifact.versioning.ComparableVersion resolvedVersion) - Specified by:
isCompatible
in interfaceStrategy
- Parameters:
expectedVersion
- The artifact version expected (artifact version b).resolvedVersion
- The proposed artifact version (artifact version a).- Returns:
- True if an artifact with Version b can be replaced by an artifact with Version a.
-