org.apache.maven.plugin.ant
Class ArtifactResolverWrapper

java.lang.Object
  extended by org.apache.maven.plugin.ant.ArtifactResolverWrapper

public class ArtifactResolverWrapper
extends Object

Wrapper object to resolve artifact.

Version:
$Id: ArtifactResolverWrapper.java 782444 2009-06-07 19:45:20Z bentmann $
Author:
Vincent Siveton

Method Summary
 String getArtifactAbsolutePath(String groupId, String artifactId, String version)
          Return the artifact path in the local repository for an artifact defined by its groupId, its artifactId and its version.
protected  org.apache.maven.artifact.factory.ArtifactFactory getFactory()
           
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)
           
 String 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 getLocalRepository()
           
protected  List getRemoteRepositories()
           
protected  org.apache.maven.artifact.resolver.ArtifactResolver getResolver()
           
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)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

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 -
factory -
localRepository -
remoteRepositories -
Returns:
an instance of ArtifactResolverWrapper

getFactory

protected org.apache.maven.artifact.factory.ArtifactFactory getFactory()

setFactory

protected void setFactory(org.apache.maven.artifact.factory.ArtifactFactory factory)

getLocalRepository

protected org.apache.maven.artifact.repository.ArtifactRepository getLocalRepository()

setLocalRepository

protected void setLocalRepository(org.apache.maven.artifact.repository.ArtifactRepository localRepository)

getRemoteRepositories

protected List getRemoteRepositories()

setRemoteRepositories

protected void setRemoteRepositories(List remoteRepositories)

getResolver

protected org.apache.maven.artifact.resolver.ArtifactResolver getResolver()

setResolver

protected void setResolver(org.apache.maven.artifact.resolver.ArtifactResolver 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 its groupId, its artifactId and its version.

Parameters:
groupId -
artifactId -
version -
Returns:
the locale artifact path
Throws:
IOException - if any

getLocalArtifactPath

public String getLocalArtifactPath(org.apache.maven.artifact.Artifact artifact)
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 be null.
Returns:
The path to the artifact, never null.


Copyright © 2002-2009 The Apache Software Foundation. All Rights Reserved.