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 Summary
ConstructorDescriptionDefaultModelVersionParser
(org.eclipse.aether.version.VersionScheme versionScheme) -
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
checkSnapshot
(String version) boolean
isSnapshot
(String version) Checks whether a given artifact version is considered aSNAPSHOT
or not.parseVersion
(String version) Parses the specified version string, for example "1.0".parseVersionConstraint
(String constraint) Parses the specified version constraint specification, for example "1.0" or "[1.0,2.0)".parseVersionRange
(String range) Parses the specified version range specification, for example "[1.0,2.0)".
-
Constructor Details
-
Method Details
-
parseVersion
Description copied from interface:ModelVersionParser
Parses the specified version string, for example "1.0".- Specified by:
parseVersion
in interfaceModelVersionParser
- Parameters:
version
- the version string to parse, must not benull
- Returns:
- the parsed version, never
null
-
parseVersionRange
Description copied from interface:ModelVersionParser
Parses the specified version range specification, for example "[1.0,2.0)".- Specified by:
parseVersionRange
in interfaceModelVersionParser
- Parameters:
range
- the range specification to parse, must not benull
- Returns:
- the parsed version range, never
null
-
isSnapshot
Description copied from interface:ModelVersionParser
Checks whether a given artifact version is considered aSNAPSHOT
or not.- Specified by:
isSnapshot
in interfaceModelVersionParser
-
checkSnapshot
-
parseVersionConstraint
Description copied from interface:ModelVersionParser
Parses the specified version constraint specification, for example "1.0" or "[1.0,2.0)".- Specified by:
parseVersionConstraint
in interfaceModelVersionParser
- Parameters:
constraint
- the range specification to parse, must not benull
- Returns:
- the parsed version constraint, never
null
-