Package org.apache.maven.api.services
Interface VersionResolver
- All Superinterfaces:
Service
- All Known Implementing Classes:
DefaultVersionResolver
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, ArtifactCoordinates artifactCoordinates) Resolves an artifact's meta version (if any) to a concrete version.
-
Method Details
-
resolve
@Nonnull default VersionResolverResult resolve(@Nonnull Session session, @Nonnull ArtifactCoordinates artifactCoordinates) 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".- Parameters:
session
- The repository session, must not benull
.artifactCoordinates
- The artifact coordinates 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".- Parameters:
request
- The version request, must not benull
.- Returns:
- The version result, never
null
. - Throws:
VersionResolverException
- If the metaversion could not be resolved.
-