org.apache.maven.project.artifact
Class MavenMetadataSource
java.lang.Object
org.codehaus.plexus.logging.AbstractLogEnabled
org.apache.maven.project.artifact.MavenMetadataSource
- All Implemented Interfaces:
- ArtifactMetadataSource, org.codehaus.plexus.logging.LogEnabled, org.codehaus.plexus.personality.plexus.lifecycle.phase.Contextualizable
@Component(role=org.apache.maven.artifact.metadata.ArtifactMetadataSource.class)
public class MavenMetadataSource
- extends org.codehaus.plexus.logging.AbstractLogEnabled
- implements ArtifactMetadataSource, org.codehaus.plexus.personality.plexus.lifecycle.phase.Contextualizable
- Version:
- $Id: MavenMetadataSource.java 732929 2009-01-09 05:34:14Z jvanzyl $
- Author:
- Jason van Zyl, Brett Porter
|
Field Summary |
static java.lang.String |
ROLE_HINT
|
|
Method Summary |
void |
contextualize(org.codehaus.plexus.context.Context context)
|
static java.util.Set<Artifact> |
createArtifacts(ArtifactFactory artifactFactory,
java.util.List<Dependency> 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<ArtifactVersion> |
retrieveAvailableVersions(Artifact artifact,
ArtifactRepository localRepository,
java.util.List<ArtifactRepository> remoteRepositories)
|
java.util.List<ArtifactVersion> |
retrieveAvailableVersionsFromDeploymentRepository(Artifact artifact,
ArtifactRepository localRepository,
ArtifactRepository deploymentRepository)
|
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. |
| Methods inherited from class org.codehaus.plexus.logging.AbstractLogEnabled |
enableLogging, getLogger, setupLogger, setupLogger, setupLogger |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ROLE_HINT
public static final java.lang.String ROLE_HINT
- See Also:
- Constant Field Values
MavenMetadataSource
public MavenMetadataSource()
retrieveRelocatedArtifact
public 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.
- Specified by:
retrieveRelocatedArtifact in interface ArtifactMetadataSource
- Throws:
ArtifactMetadataRetrievalException
retrieve
public ResolutionGroup retrieve(Artifact artifact,
ArtifactRepository localRepository,
java.util.List remoteRepositories)
throws ArtifactMetadataRetrievalException
- Retrieve the metadata for the project from the repository.
Uses the ProjectBuilder, to enable post-processing and inheritance calculation before retrieving the
associated artifacts.
- Specified by:
retrieve in interface ArtifactMetadataSource
- Throws:
ArtifactMetadataRetrievalException
createArtifacts
public static java.util.Set<Artifact> createArtifacts(ArtifactFactory artifactFactory,
java.util.List<Dependency> dependencies,
java.lang.String inheritedScope,
ArtifactFilter dependencyFilter,
MavenProject project)
throws InvalidDependencyVersionException
- Returns:
Set < Artifact >
- Throws:
InvalidDependencyVersionException
retrieveAvailableVersions
public java.util.List<ArtifactVersion> retrieveAvailableVersions(Artifact artifact,
ArtifactRepository localRepository,
java.util.List<ArtifactRepository> remoteRepositories)
throws ArtifactMetadataRetrievalException
- Specified by:
retrieveAvailableVersions in interface ArtifactMetadataSource
- Throws:
ArtifactMetadataRetrievalException
retrieveAvailableVersionsFromDeploymentRepository
public java.util.List<ArtifactVersion> retrieveAvailableVersionsFromDeploymentRepository(Artifact artifact,
ArtifactRepository localRepository,
ArtifactRepository deploymentRepository)
throws ArtifactMetadataRetrievalException
- Specified by:
retrieveAvailableVersionsFromDeploymentRepository in interface ArtifactMetadataSource
- Throws:
ArtifactMetadataRetrievalException
contextualize
public void contextualize(org.codehaus.plexus.context.Context context)
throws org.codehaus.plexus.context.ContextException
- Specified by:
contextualize in interface org.codehaus.plexus.personality.plexus.lifecycle.phase.Contextualizable
- Throws:
org.codehaus.plexus.context.ContextException
Copyright © 2001-2009 The Apache Software Foundation. All Rights Reserved.