Class AprVersionStrategy

java.lang.Object
org.basepom.mojo.dvc.strategy.AprVersionStrategy
All Implemented Interfaces:
Strategy
Direct Known Subclasses:
TwoDigitsBackwardCompatibleVersionStrategy

@Named("apr") @Singleton public class AprVersionStrategy extends Object implements Strategy
Implements Apache versioning strategy for two or three digits. It expects versions formatted as x.y, x.y.z. Versions can have an additional qualifier.

Version A (xa.ya.za) can replace Version B (xb.yb.zb) if xa == xb and xa >= xb. component z is always compatible.

If an additional qualifier exists, the qualifiers must match.

  • Constructor Details

  • Method Details

    • getName

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

      public final 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.