java.lang.Object
org.basepom.mojo.dvc.strategy.SingleDigitVersionStrategy
- All Implemented Interfaces:
Strategy
@Component(role=Strategy.class,
hint="single-digit")
public class SingleDigitVersionStrategy
extends Object
implements Strategy
Single Digit, may have a prefix. Assume that larger numbers are backwards compatible.
e.g. used for google guava.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetName()
boolean
isCompatible
(org.apache.maven.artifact.versioning.ComparableVersion expectedVersion, org.apache.maven.artifact.versioning.ComparableVersion resolvedVersion)
-
Constructor Details
-
SingleDigitVersionStrategy
public SingleDigitVersionStrategy()
-
-
Method Details
-
getName
-
isCompatible
public 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.
-