MavenRepository

@IviExperimental(reasons = [])
class MavenRepository(baseUrl: URL, repositoryName: String)

Represents a Maven repository.

Use getMavenMetadataUrl to build the URL for downloading the metadata of an artifact. Use readMavenMetadataFromStream to parse the metadata.

The metadata can be used to determine the latest available version of the artifact. Next, get the URL to download an artifact with getArtifactUrl.

Parameters

baseUrl

The URL of the repository.

repositoryName

The name of the repository. This is the first path entry after artifactory.tomtomgroup.com.

Constructors

Link copied to clipboard
constructor(baseUrl: URL, repositoryName: String)

Functions

Link copied to clipboard
fun getArtifactUrl(groupId: String, artifactId: String, version: String, variant: String?, fileExtension: String): URL

Returns a URL for downloading an artifact.

Link copied to clipboard
fun getMavenMetadataUrl(groupId: String, artifactId: String): URL

Returns a URL for downloading the maven-metadata.xml file of an artifact. The artifact is identified by the groupId and artifactId.

Link copied to clipboard

Parses maven-metadata.xml files as Metadata from stream.