Class MavenMetadataSource
java.lang.Object
org.apache.maven.project.artifact.MavenMetadataSource
- All Implemented Interfaces:
 ArtifactMetadataSource,ArtifactMetadataSource
- Direct Known Subclasses:
 DefaultMetadataSource
@Component(role=ArtifactMetadataSource.class,
           hint="maven")
public class MavenMetadataSource
extends Object
implements ArtifactMetadataSource
- Author:
 - Jason van Zyl
 
- 
Constructor Summary
Constructors - 
Method Summary
Modifier and TypeMethodDescriptioncreateArtifacts(ArtifactFactory artifactFactory, List<Dependency> dependencies, String inheritedScope, ArtifactFilter dependencyFilter, MavenProject project) Deprecated.retrieve(Artifact artifact, ArtifactRepository localRepository, List<ArtifactRepository> remoteRepositories) retrieve(Artifact artifact, ArtifactRepository localRepository, List<ArtifactRepository> remoteRepositories, boolean resolveManagedVersions) retrieve(MetadataResolutionRequest request) retrieveAvailableVersions(Artifact artifact, ArtifactRepository localRepository, List<ArtifactRepository> remoteRepositories) Get a list of available versions for an artifact in the remote repositoryretrieveAvailableVersionsFromDeploymentRepository(Artifact artifact, ArtifactRepository localRepository, ArtifactRepository deploymentRepository) Get a list of available versions for an artifact in the remote deployment repository. 
- 
Constructor Details
- 
MavenMetadataSource
public MavenMetadataSource() 
 - 
 - 
Method Details
- 
retrieve
public ResolutionGroup retrieve(Artifact artifact, ArtifactRepository localRepository, List<ArtifactRepository> remoteRepositories) throws ArtifactMetadataRetrievalException - Specified by:
 retrievein interfaceArtifactMetadataSource- Specified by:
 retrievein interfaceArtifactMetadataSource- Throws:
 ArtifactMetadataRetrievalException
 - 
retrieve
public ResolutionGroup retrieve(Artifact artifact, ArtifactRepository localRepository, List<ArtifactRepository> remoteRepositories, boolean resolveManagedVersions) throws ArtifactMetadataRetrievalException  - 
retrieve
public ResolutionGroup retrieve(MetadataResolutionRequest request) throws ArtifactMetadataRetrievalException - Specified by:
 retrievein interfaceArtifactMetadataSource- Specified by:
 retrievein interfaceArtifactMetadataSource- Throws:
 ArtifactMetadataRetrievalException
 - 
retrieveAvailableVersions
public List<ArtifactVersion> retrieveAvailableVersions(Artifact artifact, ArtifactRepository localRepository, List<ArtifactRepository> remoteRepositories) throws ArtifactMetadataRetrievalException Description copied from interface:ArtifactMetadataSourceGet a list of available versions for an artifact in the remote repository- Specified by:
 retrieveAvailableVersionsin interfaceArtifactMetadataSource- Specified by:
 retrieveAvailableVersionsin interfaceArtifactMetadataSource- Parameters:
 artifact- artifact we are interested in. OnlygroupidandartifactIdare needed, for instance the following code will workartifactFactory.createProjectArtifact( "org.apache.maven", "maven", "" )localRepository- local repositoryremoteRepositories- remote repositories,List$lt;ArtifactRepository>- Returns:
 List$lt;ArtifactVersion>- Throws:
 ArtifactMetadataRetrievalException- in case of error while retrieving repository metadata from the repository.ArtifactMetadataRetrievalException
 - 
retrieveAvailableVersions
public List<ArtifactVersion> retrieveAvailableVersions(MetadataResolutionRequest request) throws ArtifactMetadataRetrievalException - Specified by:
 retrieveAvailableVersionsin interfaceArtifactMetadataSource- Throws:
 ArtifactMetadataRetrievalException
 - 
retrieveAvailableVersionsFromDeploymentRepository
public List<ArtifactVersion> retrieveAvailableVersionsFromDeploymentRepository(Artifact artifact, ArtifactRepository localRepository, ArtifactRepository deploymentRepository) throws ArtifactMetadataRetrievalException Description copied from interface:ArtifactMetadataSourceGet 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.- Specified by:
 retrieveAvailableVersionsFromDeploymentRepositoryin interfaceArtifactMetadataSource- Specified by:
 retrieveAvailableVersionsFromDeploymentRepositoryin interfaceArtifactMetadataSource- Parameters:
 artifact- artifact we are interested in. OnlygroupidandartifactIdare needed, for instance the following code will workartifactFactory.createProjectArtifact( "org.apache.maven", "maven", "" )localRepository- local repositorydeploymentRepository- remote repository- Returns:
 List$lt;ArtifactVersion>- Throws:
 ArtifactMetadataRetrievalException- in case of error while retrieving repository metadata from the repository.ArtifactMetadataRetrievalException
 - 
createArtifacts
@Deprecated public static Set<Artifact> createArtifacts(ArtifactFactory artifactFactory, List<Dependency> dependencies, String inheritedScope, ArtifactFilter dependencyFilter, MavenProject project) throws InvalidDependencyVersionException Deprecated. 
 -