Class SingleDigitVersionStrategy

java.lang.Object
org.basepom.mojo.dvc.strategy.SingleDigitVersionStrategy
All Implemented Interfaces:
Strategy

@Named("single-digit") @Singleton 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

  • 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.