Interface ArtifactMetadataSource

All Known Subinterfaces:
ArtifactMetadataSource
All Known Implementing Classes:
DefaultMetadataSource, MavenMetadataSource

public interface ArtifactMetadataSource
Provides some metadata operations, like querying the remote repository for a list of versions available for an artifact.
Author:
Jason van Zyl
  • Method Summary

    Modifier and Type
    Method
    Description
    retrieve(org.apache.maven.artifact.Artifact artifact, org.apache.maven.artifact.repository.ArtifactRepository localRepository, List<org.apache.maven.artifact.repository.ArtifactRepository> remoteRepositories)
     
     
    List<org.apache.maven.artifact.versioning.ArtifactVersion>
    retrieveAvailableVersions(org.apache.maven.artifact.Artifact artifact, org.apache.maven.artifact.repository.ArtifactRepository localRepository, List<org.apache.maven.artifact.repository.ArtifactRepository> remoteRepositories)
    Get a list of available versions for an artifact in the remote repository
    List<org.apache.maven.artifact.versioning.ArtifactVersion>
    retrieveAvailableVersionsFromDeploymentRepository(org.apache.maven.artifact.Artifact artifact, org.apache.maven.artifact.repository.ArtifactRepository localRepository, org.apache.maven.artifact.repository.ArtifactRepository remoteRepository)
    Get a list of available versions for an artifact in the remote deployment repository.
  • Method Details

    • retrieve

      Throws:
      ArtifactMetadataRetrievalException
    • retrieve

      ResolutionGroup retrieve(org.apache.maven.artifact.Artifact artifact, org.apache.maven.artifact.repository.ArtifactRepository localRepository, List<org.apache.maven.artifact.repository.ArtifactRepository> remoteRepositories) throws ArtifactMetadataRetrievalException
      Throws:
      ArtifactMetadataRetrievalException
    • retrieveAvailableVersions

      List<org.apache.maven.artifact.versioning.ArtifactVersion> retrieveAvailableVersions(org.apache.maven.artifact.Artifact artifact, org.apache.maven.artifact.repository.ArtifactRepository localRepository, List<org.apache.maven.artifact.repository.ArtifactRepository> remoteRepositories) throws ArtifactMetadataRetrievalException
      Get a list of available versions for an artifact in the remote repository
      Parameters:
      artifact - artifact we are interested in. Only groupid and artifactId are needed, for instance the following code will work artifactFactory.createProjectArtifact( "org.apache.maven", "maven", "" )
      localRepository - local repository
      remoteRepositories - remote repositories, List $lt; ArtifactRepository >
      Returns:
      List $lt; ArtifactVersion >
      Throws:
      ArtifactMetadataRetrievalException - in case of error while retrieving repository metadata from the repository.
    • retrieveAvailableVersionsFromDeploymentRepository

      List<org.apache.maven.artifact.versioning.ArtifactVersion> retrieveAvailableVersionsFromDeploymentRepository(org.apache.maven.artifact.Artifact artifact, org.apache.maven.artifact.repository.ArtifactRepository localRepository, org.apache.maven.artifact.repository.ArtifactRepository remoteRepository) throws ArtifactMetadataRetrievalException
      Get a list of available versions for an artifact in the remote deployment repository. This ignores any update policy checks and mirrors and always retrieves the latest information from the given repository.
      Parameters:
      artifact - artifact we are interested in. Only groupid and artifactId are needed, for instance the following code will work artifactFactory.createProjectArtifact( "org.apache.maven", "maven", "" )
      localRepository - local repository
      remoteRepository - remote repository
      Returns:
      List $lt; ArtifactVersion >
      Throws:
      ArtifactMetadataRetrievalException - in case of error while retrieving repository metadata from the repository.