Package org.apache.maven.plugin.ant
Class ArtifactResolverWrapper
java.lang.Object
org.apache.maven.plugin.ant.ArtifactResolverWrapper
Wrapper object to resolve artifact.
- Version:
- $Id: ArtifactResolverWrapper.java 1645084 2014-12-12 22:28:31Z khmarbaise $
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate org.apache.maven.artifact.factory.ArtifactFactory
Factory for creating artifact objectsprivate org.apache.maven.artifact.repository.ArtifactRepository
The local repository where the artifacts are locatedprivate List
The remote repositories where artifacts are locatedprivate org.apache.maven.artifact.resolver.ArtifactResolver
Used for resolving artifacts -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivate
ArtifactResolverWrapper
(org.apache.maven.artifact.resolver.ArtifactResolver resolver, org.apache.maven.artifact.factory.ArtifactFactory factory, org.apache.maven.artifact.repository.ArtifactRepository localRepository, List remoteRepositories) -
Method Summary
Modifier and TypeMethodDescriptiongetArtifactAbsolutePath
(String groupId, String artifactId, String version) Return the artifact path in the local repository for an artifact defined by itsgroupId
, itsartifactId
and itsversion
.protected org.apache.maven.artifact.factory.ArtifactFactory
static ArtifactResolverWrapper
getInstance
(org.apache.maven.artifact.resolver.ArtifactResolver resolver, org.apache.maven.artifact.factory.ArtifactFactory factory, org.apache.maven.artifact.repository.ArtifactRepository localRepository, List remoteRepositories) getLocalArtifactPath
(org.apache.maven.artifact.Artifact artifact) Gets the path to the specified artifact relative to the local repository's base directory.protected org.apache.maven.artifact.repository.ArtifactRepository
protected List
protected org.apache.maven.artifact.resolver.ArtifactResolver
protected void
setFactory
(org.apache.maven.artifact.factory.ArtifactFactory factory) protected void
setLocalRepository
(org.apache.maven.artifact.repository.ArtifactRepository localRepository) protected void
setRemoteRepositories
(List remoteRepositories) protected void
setResolver
(org.apache.maven.artifact.resolver.ArtifactResolver resolver)
-
Field Details
-
resolver
private org.apache.maven.artifact.resolver.ArtifactResolver resolverUsed for resolving artifacts -
factory
private org.apache.maven.artifact.factory.ArtifactFactory factoryFactory for creating artifact objects -
localRepository
private org.apache.maven.artifact.repository.ArtifactRepository localRepositoryThe local repository where the artifacts are located -
remoteRepositories
The remote repositories where artifacts are located
-
-
Constructor Details
-
ArtifactResolverWrapper
private ArtifactResolverWrapper(org.apache.maven.artifact.resolver.ArtifactResolver resolver, org.apache.maven.artifact.factory.ArtifactFactory factory, org.apache.maven.artifact.repository.ArtifactRepository localRepository, List remoteRepositories) - Parameters:
resolver
-factory
-localRepository
-remoteRepositories
-
-
-
Method Details
-
getInstance
public static ArtifactResolverWrapper getInstance(org.apache.maven.artifact.resolver.ArtifactResolver resolver, org.apache.maven.artifact.factory.ArtifactFactory factory, org.apache.maven.artifact.repository.ArtifactRepository localRepository, List remoteRepositories) - Parameters:
resolver
-ArtifactResolver
factory
-ArtifactFactory
localRepository
-ArtifactRepository
remoteRepositories
-invalid reference
XX
- Returns:
- an instance of ArtifactResolverWrapper
-
getFactory
protected org.apache.maven.artifact.factory.ArtifactFactory getFactory()- Returns:
factory
-
setFactory
protected void setFactory(org.apache.maven.artifact.factory.ArtifactFactory factory) - Parameters:
factory
-ArtifactFactory
-
getLocalRepository
protected org.apache.maven.artifact.repository.ArtifactRepository getLocalRepository()- Returns:
localRepository
-
setLocalRepository
protected void setLocalRepository(org.apache.maven.artifact.repository.ArtifactRepository localRepository) - Parameters:
localRepository
- setlocalRepository
-
getRemoteRepositories
- Returns:
remoteRepositories
-
setRemoteRepositories
- Parameters:
remoteRepositories
-remoteRepositories
-
getResolver
protected org.apache.maven.artifact.resolver.ArtifactResolver getResolver()- Returns:
resolver
-
setResolver
protected void setResolver(org.apache.maven.artifact.resolver.ArtifactResolver resolver) - Parameters:
resolver
-resolver
-
getArtifactAbsolutePath
public String getArtifactAbsolutePath(String groupId, String artifactId, String version) throws IOException Return the artifact path in the local repository for an artifact defined by itsgroupId
, itsartifactId
and itsversion
.- Parameters:
groupId
- The groupId.artifactId
- The artifactId.version
- The version.- Returns:
- the locale artifact path
- Throws:
IOException
- if any
-
getLocalArtifactPath
Gets the path to the specified artifact relative to the local repository's base directory. Note that this method does not actually resolve the artifact, it merely calculates the path at which the artifact is or would be stored in the local repository.- Parameters:
artifact
- The artifact whose path should be determined, must not benull
.- Returns:
- The path to the artifact, never
null
.
-