Class DefaultModelVersionParser

java.lang.Object
org.apache.maven.repository.internal.DefaultModelVersionParser
All Implemented Interfaces:
ModelVersionParser

@Named @Singleton public class DefaultModelVersionParser extends Object implements ModelVersionParser
  • Constructor Details Link icon

    • DefaultModelVersionParser Link icon

      @Inject public DefaultModelVersionParser(org.eclipse.aether.version.VersionScheme versionScheme)
  • Method Details Link icon

    • parseVersion Link icon

      public Version parseVersion(String version)
      Description copied from interface: ModelVersionParser
      Parses the specified version string, for example "1.0".
      Specified by:
      parseVersion in interface ModelVersionParser
      Parameters:
      version - the version string to parse, must not be null
      Returns:
      the parsed version, never null
    • parseVersionRange Link icon

      public VersionRange parseVersionRange(String range)
      Description copied from interface: ModelVersionParser
      Parses the specified version range specification, for example "[1.0,2.0)".
      Specified by:
      parseVersionRange in interface ModelVersionParser
      Parameters:
      range - the range specification to parse, must not be null
      Returns:
      the parsed version range, never null
    • isSnapshot Link icon

      public boolean isSnapshot(String version)
      Description copied from interface: ModelVersionParser
      Checks whether a given artifact version is considered a SNAPSHOT or not.
      Specified by:
      isSnapshot in interface ModelVersionParser
    • checkSnapshot Link icon

      public static boolean checkSnapshot(String version)
    • parseVersionConstraint Link icon

      public VersionConstraint parseVersionConstraint(String constraint)
      Description copied from interface: ModelVersionParser
      Parses the specified version constraint specification, for example "1.0" or "[1.0,2.0)".
      Specified by:
      parseVersionConstraint in interface ModelVersionParser
      Parameters:
      constraint - the range specification to parse, must not be null
      Returns:
      the parsed version constraint, never null