Class SingleDigitVersionStrategy

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 Details

    • SingleDigitVersionStrategy

      public SingleDigitVersionStrategy()
  • Method Details

    • getName

      public String getName()
      Specified by:
      getName in interface Strategy
      Returns:
      The name of the strategy.
    • isCompatible

      public boolean isCompatible(org.apache.maven.artifact.versioning.ComparableVersion expectedVersion, org.apache.maven.artifact.versioning.ComparableVersion resolvedVersion)
      Specified by:
      isCompatible in interface Strategy
      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.