org.apache.maven.artifact.metadata
Interface ArtifactMetadataSource


public interface ArtifactMetadataSource

Provides some metadata operations, like querying the remote repository for a list of versions available for an artifact.

Version:
$Id: ArtifactMetadataSource.java 675351 2008-07-09 21:43:56Z jdcasey $
Author:
Jason van Zyl

Field Summary
static java.lang.String ROLE
           
 
Method Summary
 ResolutionGroup retrieve(Artifact artifact, ArtifactRepository localRepository, java.util.List<ArtifactRepository> remoteRepositories)
           
 java.util.List<ArtifactVersion> retrieveAvailableVersions(Artifact artifact, ArtifactRepository localRepository, java.util.List<ArtifactRepository> remoteRepositories)
          Get a list of available versions for an artifact in the remote repository
 java.util.List<ArtifactVersion> retrieveAvailableVersionsFromDeploymentRepository(Artifact artifact, ArtifactRepository localRepository, ArtifactRepository remoteRepository)
          Get a list of available versions for an artifact in the remote deployment repository.
 Artifact retrieveRelocatedArtifact(Artifact artifact, ArtifactRepository localRepository, java.util.List<ArtifactRepository> remoteRepositories)
          Resolve all relocations in the POM for this artifact, and return the new artifact coordinate.
 

Field Detail

ROLE

static final java.lang.String ROLE
Method Detail

retrieve

ResolutionGroup retrieve(Artifact artifact,
                         ArtifactRepository localRepository,
                         java.util.List<ArtifactRepository> remoteRepositories)
                         throws ArtifactMetadataRetrievalException
Throws:
ArtifactMetadataRetrievalException

retrieveRelocatedArtifact

Artifact retrieveRelocatedArtifact(Artifact artifact,
                                   ArtifactRepository localRepository,
                                   java.util.List<ArtifactRepository> remoteRepositories)
                                   throws ArtifactMetadataRetrievalException
Resolve all relocations in the POM for this artifact, and return the new artifact coordinate.

Throws:
ArtifactMetadataRetrievalException

retrieveAvailableVersions

java.util.List<ArtifactVersion> retrieveAvailableVersions(Artifact artifact,
                                                          ArtifactRepository localRepository,
                                                          java.util.List<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

java.util.List<ArtifactVersion> retrieveAvailableVersionsFromDeploymentRepository(Artifact artifact,
                                                                                  ArtifactRepository localRepository,
                                                                                  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
deploymentRepository - remote repository
Returns:
List $lt; ArtifactVersion >
Throws:
ArtifactMetadataRetrievalException - in case of error while retrieving repository metadata from the repository.


Copyright © 2001-2009 The Apache Software Foundation. All Rights Reserved.