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
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 772278 2009-05-06 14:31:49Z pgier $

Field Summary
 String MD5_ALGO_NAME
           
 String UTF_ENC_NAME
           
 
Fields inherited from class org.apache.tools.ant.Task
description, location, target, taskName, taskType, wrapper
 
Fields inherited from class org.apache.tools.ant.ProjectComponent
project
 
Constructor Summary
AbstractArtifactWithRepositoryTask()
           
 
Method Summary
 void addConfiguredRemoteRepository(RemoteRepository remoteRepository)
          This is called automatically by ant when the task is initialized.
protected  List createRemoteArtifactRepositories()
           
protected  List createRemoteArtifactRepositories(List pomRepositories)
          Create the list of ArtifactRepository-ies where artifacts can be downloaded.
 String generateDefaultRepositoryId(RemoteRepository repository)
          Generates an MD5 digest based on the url of the repository.
 List getRemoteRepositories()
           
 
Methods inherited from class org.apache.maven.artifact.ant.AbstractArtifactTask
addLocalRepository, addPom, buildPom, createAntRemoteRepository, createAntRemoteRepositoryBase, createDummyArtifact, createDummyPom, createLocalArtifactRepository, createRemoteArtifactRepository, diagnoseError, doExecute, execute, getArtifactRepositoryFactory, getContainer, getDefaultLocalRepository, getLocalRepository, getPomRefId, getProfileManager, getSettings, getSupportedProtocols, getSupportedProtocolsAsString, lookup, lookup, releaseArtifactRepositoryFactory, setPomRefId, setProfiles, setSettingsFile, updateRepositoryWithSettings
 
Methods inherited from class org.apache.tools.ant.Task
getDescription, getLocation, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, init, isInvalid, log, log, maybeConfigure, perform, reconfigure, setDescription, setLocation, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskType
 
Methods inherited from class org.apache.tools.ant.ProjectComponent
getProject, setProject
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MD5_ALGO_NAME

public final String MD5_ALGO_NAME
See Also:
Constant Field Values

UTF_ENC_NAME

public final String UTF_ENC_NAME
See Also:
Constant Field Values
Constructor Detail

AbstractArtifactWithRepositoryTask

public AbstractArtifactWithRepositoryTask()
Method Detail

createRemoteArtifactRepositories

protected List createRemoteArtifactRepositories()

createRemoteArtifactRepositories

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

Parameters:
pomRepositories - additionnal repositories defined in pom (or null if none)
Returns:
the list of ArtifactRepository-ies
See Also:
AbstractArtifactTask.createRemoteArtifactRepository(RemoteRepository)

getRemoteRepositories

public List getRemoteRepositories()

addConfiguredRemoteRepository

public void addConfiguredRemoteRepository(RemoteRepository remoteRepository)
This is called automatically by ant when the task is initialized. Need to use "addConfigured..." instead of "add..." because the repository Id and URL need to be set before the method is called.

Parameters:
remoteRepository -

generateDefaultRepositoryId

public String generateDefaultRepositoryId(RemoteRepository repository)
Generates an MD5 digest based on the url of the repository. This is safer to use for the id than the url. MANTTASKS-142

Parameters:
repository -
Returns:


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