org.apache.ivy.ant

Class IvyTask

public abstract class IvyTask extends Task

Base class for all ivy ant tasks, deal particularly with ivy instance storage in ant project.
Field Summary
static StringANT_PROJECT_CONTEXT_KEY
Method Summary
protected voidcacheAttributeNotSupported()
Informs the user that the cache attribute is not supported any more.
abstract voiddoExecute()
The real logic of task execution after project has been set in the context.
protected booleandoValidate(IvySettings ivy)
voidexecute()
Ant task execute.
protected voidfinalizeTask()
Called when task is about to finish Should clean up all state related information (stacks for example)
protected IvygetIvyInstance()
protected StringgetProperty(String value, IvySettings ivy, String name)
protected StringgetProperty(String value, IvySettings ivy, String name, String resolveId)
protected StringgetProperty(IvySettings ivy, String name, String resolveId)
protected StringgetProperty(IvySettings ivy, String name)
protected DategetPubDate(String date, Date def)
protected String[]getResolvedConfigurations(String org, String module, boolean strict)
protected ObjectgetResolvedDescriptor(String resolveId)
protected ObjectgetResolvedDescriptor(String resolveId, boolean strict)
protected ObjectgetResolvedDescriptor(String org, String module)
protected ObjectgetResolvedDescriptor(String org, String module, boolean strict)
protected ResolveReportgetResolvedReport(String org, String module, String resolveId)
protected IvySettingsgetSettings()
ReferencegetSettingsRef()
booleanisValidate()
protected StringmergeConfs(String[] conf)
protected voidprepareTask()
Called when task starts its execution.
protected voidsetResolved(ResolveReport report, boolean keep)
protected voidsetResolved(ResolveReport report, String resolveId, boolean keep)
voidsetSettingsRef(Reference ref)
voidsetValidate(boolean validate)
protected String[]splitConfs(String conf)
StringtoString()

Field Detail

ANT_PROJECT_CONTEXT_KEY

public static final String ANT_PROJECT_CONTEXT_KEY

Method Detail

cacheAttributeNotSupported

protected void cacheAttributeNotSupported()
Informs the user that the cache attribute is not supported any more.

doExecute

public abstract void doExecute()
The real logic of task execution after project has been set in the context. MUST be implemented by subclasses

Throws: BuildException

doValidate

protected boolean doValidate(IvySettings ivy)

execute

public final void execute()
Ant task execute. Calls prepareTask, doExecute, finalzeTask

finalizeTask

protected void finalizeTask()
Called when task is about to finish Should clean up all state related information (stacks for example)

getIvyInstance

protected Ivy getIvyInstance()

getProperty

protected String getProperty(String value, IvySettings ivy, String name)

getProperty

protected String getProperty(String value, IvySettings ivy, String name, String resolveId)

getProperty

protected String getProperty(IvySettings ivy, String name, String resolveId)

getProperty

protected String getProperty(IvySettings ivy, String name)

getPubDate

protected Date getPubDate(String date, Date def)

getResolvedConfigurations

protected String[] getResolvedConfigurations(String org, String module, boolean strict)

getResolvedDescriptor

protected Object getResolvedDescriptor(String resolveId)

getResolvedDescriptor

protected Object getResolvedDescriptor(String resolveId, boolean strict)

getResolvedDescriptor

protected Object getResolvedDescriptor(String org, String module)

getResolvedDescriptor

protected Object getResolvedDescriptor(String org, String module, boolean strict)

getResolvedReport

protected ResolveReport getResolvedReport(String org, String module, String resolveId)

getSettings

protected IvySettings getSettings()

getSettingsRef

public Reference getSettingsRef()

isValidate

public boolean isValidate()

mergeConfs

protected String mergeConfs(String[] conf)

prepareTask

protected void prepareTask()
Called when task starts its execution.

setResolved

protected void setResolved(ResolveReport report, boolean keep)

setResolved

protected void setResolved(ResolveReport report, String resolveId, boolean keep)

setSettingsRef

public void setSettingsRef(Reference ref)

setValidate

public void setValidate(boolean validate)

splitConfs

protected String[] splitConfs(String conf)

toString

public String toString()