Package org.apache.maven.api.services
Interface VersionRangeResolverRequest
- All Superinterfaces:
RepositoryAwareRequest,Request<Session>
A request to resolve a version range to a list of matching versions.
This request is used by
VersionRangeResolver to expand version ranges
(e.g., "[3.8,4.0)") into concrete versions available in the configured repositories.- Since:
- 4.0.0
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic enumSpecifies which type of repositories to query when resolving version ranges.static classBuilder forVersionRangeResolverRequest. -
Method Summary
Modifier and TypeMethodDescriptionstatic VersionRangeResolverRequestbuild(Session session, ArtifactCoordinates artifactCoordinates) Creates a version range resolver request using the session's repositories.static VersionRangeResolverRequestbuild(Session session, ArtifactCoordinates artifactCoordinates, List<RemoteRepository> repositories) Creates a version range resolver request.static VersionRangeResolverRequestbuild(Session session, ArtifactCoordinates artifactCoordinates, List<RemoteRepository> repositories, VersionRangeResolverRequest.Nature nature) Creates a version range resolver request.builder()Creates a new builder for version range resolver requests.Gets the artifact coordinates whose version range should be resolved.Gets the nature of repositories to query when resolving the version range.Methods inherited from interface org.apache.maven.api.services.RepositoryAwareRequest
getRepositories, validate
-
Method Details
-
getArtifactCoordinates
Gets the artifact coordinates whose version range should be resolved. The coordinates may contain a version range (e.g., "[1.0,2.0)") or a single version.- Returns:
- the artifact coordinates, never
null
-
getNature
Gets the nature of repositories to query when resolving the version range. This determines whether to search in release repositories, snapshot repositories, or both.- Returns:
- the repository nature, never
null
-
build
@Nonnull static VersionRangeResolverRequest build(@Nonnull Session session, @Nonnull ArtifactCoordinates artifactCoordinates) Creates a version range resolver request using the session's repositories.- Parameters:
session- the session to use, must not benullartifactCoordinates- the artifact coordinates whose version range should be resolved, must not benull- Returns:
- the version range resolver request, never
null
-
build
@Nonnull static VersionRangeResolverRequest build(@Nonnull Session session, @Nonnull ArtifactCoordinates artifactCoordinates, @Nullable List<RemoteRepository> repositories) Creates a version range resolver request.- Parameters:
session- the session to use, must not benullartifactCoordinates- the artifact coordinates whose version range should be resolved, must not benullrepositories- the repositories to use, ornullto use the session's repositories- Returns:
- the version range resolver request, never
null
-
build
@Nonnull static VersionRangeResolverRequest build(@Nonnull Session session, @Nonnull ArtifactCoordinates artifactCoordinates, @Nullable List<RemoteRepository> repositories, @Nullable VersionRangeResolverRequest.Nature nature) Creates a version range resolver request.- Parameters:
session- the session to use, must not benullartifactCoordinates- the artifact coordinates whose version range should be resolved, must not benullrepositories- the repositories to use, ornullto use the session's repositoriesnature- the nature of repositories to query when resolving the version range, ornullto use the default- Returns:
- the version range resolver request, never
null
-
builder
Creates a new builder for version range resolver requests.- Returns:
- a new builder, never
null
-