Package org.apache.maven.api.services
Interface VersionResolver
- All Superinterfaces:
Service
Resolves artifact meta/pseudo versions.
- Since:
- 4.0.0
-
Method Summary
Modifier and TypeMethodDescriptionresolve
(VersionResolverRequest request) Resolves an artifact's meta version (if any) to a concrete version.default VersionResolverResult
resolve
(Session session, ArtifactCoordinate artifactCoordinate) Resolves an artifact's meta version (if any) to a concrete version.
-
Method Details
-
resolve
@Nonnull default VersionResolverResult resolve(@Nonnull Session session, @Nonnull ArtifactCoordinate artifactCoordinate) throws VersionResolverException Resolves an artifact's meta version (if any) to a concrete version. For example, resolves "1.0-SNAPSHOT" to "1.0-20090208.132618-23" or "RELEASE"/"LATEST" to "2.0".- Parameters:
session
- The repository session, must not benull
.artifactCoordinate
- The artifact coordinate for which the version needs to be resolved, must not benull
- Returns:
- The version result, never
null
. - Throws:
VersionResolverException
- If the metaversion could not be resolved.
-
resolve
@Nonnull VersionResolverResult resolve(@Nonnull VersionResolverRequest request) throws VersionResolverException Resolves an artifact's meta version (if any) to a concrete version. For example, resolves "1.0-SNAPSHOT" to "1.0-20090208.132618-23" or "RELEASE"/"LATEST" to "2.0".- Parameters:
request
- The version request, must not benull
.- Returns:
- The version result, never
null
. - Throws:
VersionResolverException
- If the metaversion could not be resolved.
-