MavenRepositoryUpdateChecker

@IviExperimental(reasons = [])
abstract class MavenRepositoryUpdateChecker(updateFeedId: UpdateFeedId)

Base class for obtaining update information about the latest version of an artifact hosted in a Maven repository. The information of the latest version (ArtifactUpdateInfo) consists of:

  • The version.

  • The URL to download the artifact.

  • The size of the artifact.

  • The updateFeedId.

The artifact is identified by ArtifactSelectionData.groupId and ArtifactSelectionData.artifactId.

The artifacts information obtained from this Maven repository is associated to the given updateFeedId.

To obtain the ArtifactUpdateInfo, the metadata of the artifact is obtained first. Next, the download URL is formatted based on the artifact identifiers, the latest version obtained from the metadata, the ArtifactSelectionData.variant and the ArtifactSelectionData.fileExtension. Finally, the size of the artifact is obtained from the content-length HTTP header by requesting HTTP headers of the download URL.

Implementations can override configureHttpClient to configure authentication credentials to access mavenRepository.

Constructors

Link copied to clipboard
constructor(updateFeedId: UpdateFeedId)

Types

Link copied to clipboard
data class ArtifactSelectionData(val groupId: String, val artifactId: String, val variant: String?, val fileExtension: String)

Select an artifact from a mavenRepository.

Link copied to clipboard
object Companion

Functions

Link copied to clipboard

Obtains ArtifactUpdateInfo for an artifact hosted on mavenRepository. The artifact is selected based on artifactSelectionData.