public class MavenMetadataSource extends AbstractLogEnabled implements ArtifactMetadataSource
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
ROLE_HINT |
ROLE
Constructor and Description |
---|
MavenMetadataSource() |
Modifier and Type | Method and Description |
---|---|
static java.util.Set |
createArtifacts(ArtifactFactory artifactFactory,
java.util.List dependencies,
java.lang.String inheritedScope,
ArtifactFilter dependencyFilter,
MavenProject project) |
ResolutionGroup |
retrieve(Artifact artifact,
ArtifactRepository localRepository,
java.util.List remoteRepositories)
Retrieve the metadata for the project from the repository.
|
java.util.List |
retrieveAvailableVersions(Artifact artifact,
ArtifactRepository localRepository,
java.util.List remoteRepositories)
Get a list of available versions for an artifact in the remote repository
|
Artifact |
retrieveRelocatedArtifact(Artifact artifact,
ArtifactRepository localRepository,
java.util.List remoteRepositories)
Resolve all relocations in the POM for this artifact, and return the new artifact coordinate.
|
public static final java.lang.String ROLE_HINT
public Artifact retrieveRelocatedArtifact(Artifact artifact, ArtifactRepository localRepository, java.util.List remoteRepositories) throws ArtifactMetadataRetrievalException
retrieveRelocatedArtifact
in interface ArtifactMetadataSource
ArtifactMetadataRetrievalException
public ResolutionGroup retrieve(Artifact artifact, ArtifactRepository localRepository, java.util.List remoteRepositories) throws ArtifactMetadataRetrievalException
retrieve
in interface ArtifactMetadataSource
ArtifactMetadataRetrievalException
public static java.util.Set createArtifacts(ArtifactFactory artifactFactory, java.util.List dependencies, java.lang.String inheritedScope, ArtifactFilter dependencyFilter, MavenProject project) throws InvalidDependencyVersionException
Set
< Artifact
>InvalidDependencyVersionException
public java.util.List retrieveAvailableVersions(Artifact artifact, ArtifactRepository localRepository, java.util.List 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.