@Component(role=ArtifactMetadataSource.class, hint="maven") public class MavenMetadataSource extends Object implements ArtifactMetadataSource
Constructor and Description |
---|
MavenMetadataSource() |
Modifier and Type | Method and Description |
---|---|
static Set<Artifact> |
createArtifacts(ArtifactFactory artifactFactory,
List<Dependency> dependencies,
String inheritedScope,
ArtifactFilter dependencyFilter,
MavenProject project)
Deprecated.
|
ResolutionGroup |
retrieve(Artifact artifact,
ArtifactRepository localRepository,
List<ArtifactRepository> remoteRepositories) |
ResolutionGroup |
retrieve(Artifact artifact,
ArtifactRepository localRepository,
List<ArtifactRepository> remoteRepositories,
boolean resolveManagedVersions) |
ResolutionGroup |
retrieve(MetadataResolutionRequest request) |
List<ArtifactVersion> |
retrieveAvailableVersions(Artifact artifact,
ArtifactRepository localRepository,
List<ArtifactRepository> remoteRepositories)
Get a list of available versions for an artifact in the remote repository
|
List<ArtifactVersion> |
retrieveAvailableVersions(MetadataResolutionRequest request) |
List<ArtifactVersion> |
retrieveAvailableVersionsFromDeploymentRepository(Artifact artifact,
ArtifactRepository localRepository,
ArtifactRepository deploymentRepository)
Get a list of available versions for an artifact in the remote deployment repository.
|
public MavenMetadataSource()
public ResolutionGroup retrieve(Artifact artifact, ArtifactRepository localRepository, List<ArtifactRepository> remoteRepositories) throws ArtifactMetadataRetrievalException
retrieve
in interface ArtifactMetadataSource
ArtifactMetadataRetrievalException
public ResolutionGroup retrieve(Artifact artifact, ArtifactRepository localRepository, List<ArtifactRepository> remoteRepositories, boolean resolveManagedVersions) throws ArtifactMetadataRetrievalException
public ResolutionGroup retrieve(MetadataResolutionRequest request) throws ArtifactMetadataRetrievalException
retrieve
in interface ArtifactMetadataSource
ArtifactMetadataRetrievalException
public List<ArtifactVersion> retrieveAvailableVersions(Artifact artifact, ArtifactRepository localRepository, List<ArtifactRepository> remoteRepositories) throws ArtifactMetadataRetrievalException
ArtifactMetadataSource
retrieveAvailableVersions
in interface ArtifactMetadataSource
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 repositoryremoteRepositories
- remote repositories, List
$lt; ArtifactRepository
>List
$lt; ArtifactVersion
>ArtifactMetadataRetrievalException
- in case of error while retrieving repository metadata from the repository.ArtifactMetadataRetrievalException
public List<ArtifactVersion> retrieveAvailableVersions(MetadataResolutionRequest request) throws ArtifactMetadataRetrievalException
public List<ArtifactVersion> retrieveAvailableVersionsFromDeploymentRepository(Artifact artifact, ArtifactRepository localRepository, ArtifactRepository deploymentRepository) throws ArtifactMetadataRetrievalException
ArtifactMetadataSource
retrieveAvailableVersionsFromDeploymentRepository
in interface ArtifactMetadataSource
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 repositorydeploymentRepository
- remote repositoryList
$lt; ArtifactVersion
>ArtifactMetadataRetrievalException
- in case of error while retrieving repository metadata from the repository.ArtifactMetadataRetrievalException
@Deprecated public static Set<Artifact> createArtifacts(ArtifactFactory artifactFactory, List<Dependency> dependencies, String inheritedScope, ArtifactFilter dependencyFilter, MavenProject project) throws InvalidDependencyVersionException
Copyright © 2001–2014 The Apache Software Foundation. All rights reserved.