org.apache.maven.artifact.ant
Class AbstractArtifactWithRepositoryTask

java.lang.Object
  extended by org.apache.tools.ant.ProjectComponent
      extended by org.apache.tools.ant.Task
          extended by org.apache.maven.artifact.ant.AbstractArtifactTask
              extended by org.apache.maven.artifact.ant.AbstractArtifactWithRepositoryTask
All Implemented Interfaces:
java.lang.Cloneable
Direct Known Subclasses:
DependenciesTask, InstallWagonProviderTask, Pom

public abstract class AbstractArtifactWithRepositoryTask
extends AbstractArtifactTask

Base class for atifact tasks that are able to download artifact from repote repositories.

Version:
$Id: AbstractArtifactWithRepositoryTask.java 551463 2007-06-28 06:04:10Z jvanzyl $

Field Summary
private  java.util.List remoteRepositories
          List of Ant Tasks RemoteRepository-ies
 
Fields inherited from class org.apache.tools.ant.Task
target, taskName, taskType, wrapper
 
Fields inherited from class org.apache.tools.ant.ProjectComponent
description, location, project
 
Constructor Summary
AbstractArtifactWithRepositoryTask()
           
 
Method Summary
 void addRemoteRepository(RemoteRepository remoteRepository)
           
protected  java.util.List createRemoteArtifactRepositories()
          Create the list of ArtifactRepository-ies where artifacts can be downloaded.
private static RemoteRepository getDefaultRemoteRepository()
          Get the default remote repository.
 java.util.List getRemoteRepositories()
           
private static java.lang.String statusAsString(RepositoryPolicy policy)
           
 
Methods inherited from class org.apache.maven.artifact.ant.AbstractArtifactTask
addLocalRepository, addPom, buildPom, createAntRemoteRepository, createAntRemoteRepositoryBase, createArtifact, createDummyPom, createLocalArtifactRepository, createRemoteArtifactRepository, diagnoseError, doExecute, execute, getContainer, getDefaultLocalRepository, getLocalRepository, getPomRefId, getSettings, getSupportedProtocols, getSupportedProtocolsAsString, lookup, lookup, setPomRefId, setProfiles, setSettingsFile
 
Methods inherited from class org.apache.tools.ant.Task
bindToOwner, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, init, isInvalid, log, log, log, log, maybeConfigure, perform, reconfigure, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskType
 
Methods inherited from class org.apache.tools.ant.ProjectComponent
clone, getDescription, getLocation, getProject, setDescription, setLocation, setProject
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

remoteRepositories

private java.util.List remoteRepositories
List of Ant Tasks RemoteRepository-ies

Constructor Detail

AbstractArtifactWithRepositoryTask

public AbstractArtifactWithRepositoryTask()
Method Detail

getDefaultRemoteRepository

private static RemoteRepository getDefaultRemoteRepository()
Get the default remote repository.

Returns:
central repository

statusAsString

private static java.lang.String statusAsString(RepositoryPolicy policy)

createRemoteArtifactRepositories

protected java.util.List createRemoteArtifactRepositories()
Create the list of ArtifactRepository-ies where artifacts can be downloaded. If no remote repository has been configured, adds central repository.

Returns:
the list of ArtifactRepository-ies
See Also:
AbstractArtifactTask.createRemoteArtifactRepository(RemoteRepository)

getRemoteRepositories

public java.util.List getRemoteRepositories()

addRemoteRepository

public void addRemoteRepository(RemoteRepository remoteRepository)