@Component(role=ArtifactMetadataSource.class, hint="maven") public class MavenMetadataSource extends Object implements ArtifactMetadataSource
Constructor and Description |
---|
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–2021 The Apache Software Foundation. All rights reserved.