org.apache.ivy.ant

## Class IvyTask

- java.lang.Object
- - org.apache.tools.ant.ProjectComponent
  - - org.apache.tools.ant.Task
    - - org.apache.ivy.ant.IvyTask

- All Implemented Interfaces:
    java.lang.Cloneable
  Direct Known Subclasses:
    ConvertManifestTask, IvyBuildList, IvyBuildNumber, IvyCheck, IvyCleanCache, IvyConvertPom, IvyDeliver, IvyFindRevision, IvyInfo, IvyInstall, IvyListModules, IvyMakePom, IvyPostResolveTask, IvyPublish, IvyReport, IvyRepositoryReport, IvyResolve, IvyVar

      public abstract class IvyTask
      extends org.apache.tools.ant.Task

  Base class for all ivy ant tasks, deal particularly with ivy instance storage in ant project.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static java.lang.String` | `ANT_PROJECT_CONTEXT_KEY`

    - ### 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

    Constructors
    Constructor and Description
    `IvyTask()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected void` | `cacheAttributeNotSupported()` Informs the user that the cache attribute is not supported any more.
    `abstract void` | `doExecute()` The real logic of task execution after project has been set in the context.
    `protected boolean` | `doValidate(IvySettings ivy)`
    `void` | `execute()` Ant task execute.
    `protected void` | `finalizeTask()` Called when task is about to finish Should clean up all state related information (stacks for example)
    `protected Ivy` | `getIvyInstance()`
    `protected java.lang.String` | `getProperty(IvySettings ivy, java.lang.String name)`
    `protected java.lang.String` | `getProperty(IvySettings ivy, java.lang.String name, java.lang.String resolveId)`
    `protected java.lang.String` | `getProperty(java.lang.String value, IvySettings ivy, java.lang.String name)`
    `protected java.lang.String` | `getProperty(java.lang.String value, IvySettings ivy, java.lang.String name, java.lang.String resolveId)`
    `protected static java.util.Date` | `getPubDate(java.lang.String date, java.util.Date def)`
    `protected java.lang.String[]` | `getResolvedConfigurations(java.lang.String org, java.lang.String module, boolean strict)`
    `protected java.lang.Object` | `getResolvedDescriptor(java.lang.String resolveId)`
    `protected java.lang.Object` | `getResolvedDescriptor(java.lang.String resolveId, boolean strict)`
    `protected java.lang.Object` | `getResolvedDescriptor(java.lang.String org, java.lang.String module)`
    `protected java.lang.Object` | `getResolvedDescriptor(java.lang.String org, java.lang.String module, boolean strict)`
    `protected ResolveReport` | `getResolvedReport(java.lang.String org, java.lang.String module, java.lang.String resolveId)`
    `protected IvySettings` | `getSettings()`
    `org.apache.tools.ant.types.Reference` | `getSettingsRef()`
    `boolean` | `isValidate()`
    `protected java.lang.String` | `mergeConfs(java.lang.String[] conf)`
    `protected void` | `prepareTask()` Called when task starts its execution.
    `protected void` | `setResolved(ResolveReport report, boolean keep)`
    `protected void` | `setResolved(ResolveReport report, java.lang.String resolveId, boolean keep)`
    `void` | `setSettingsRef(org.apache.tools.ant.types.Reference ref)`
    `void` | `setValidate(boolean validate)`
    `protected java.lang.String[]` | `splitConfs(java.lang.String conf)`
    `java.lang.String` | `toString()`

    - ### 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, wait, wait, wait`

- - ### Field Detail

    - #### ANT_PROJECT_CONTEXT_KEY

          public static final java.lang.String ANT_PROJECT_CONTEXT_KEY

      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### IvyTask

          public IvyTask()

  - ### Method Detail

    - #### doValidate

          protected boolean doValidate(IvySettings ivy)

    - #### isValidate

          public boolean isValidate()

    - #### setValidate

          public void setValidate(boolean validate)

    - #### setSettingsRef

          public void setSettingsRef(org.apache.tools.ant.types.Reference ref)

    - #### getSettingsRef

          public org.apache.tools.ant.types.Reference getSettingsRef()

    - #### getSettings

          protected IvySettings getSettings()

    - #### getIvyInstance

          protected Ivy getIvyInstance()

    - #### setResolved

          protected void setResolved(ResolveReport report,
                         boolean keep)

    - #### setResolved

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

    - #### getResolvedConfigurations

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

    - #### getResolvedDescriptor

          protected java.lang.Object getResolvedDescriptor(java.lang.String resolveId)

    - #### getResolvedDescriptor

          protected java.lang.Object getResolvedDescriptor(java.lang.String resolveId,
                                               boolean strict)

    - #### getResolvedDescriptor

          protected java.lang.Object getResolvedDescriptor(java.lang.String org,
                                               java.lang.String module)

    - #### getResolvedDescriptor

          protected java.lang.Object getResolvedDescriptor(java.lang.String org,
                                               java.lang.String module,
                                               boolean strict)

    - #### getResolvedReport

          protected ResolveReport getResolvedReport(java.lang.String org,
                                        java.lang.String module,
                                        java.lang.String resolveId)

    - #### splitConfs

          protected java.lang.String[] splitConfs(java.lang.String conf)

    - #### mergeConfs

          protected java.lang.String mergeConfs(java.lang.String[] conf)

    - #### getPubDate

          protected static java.util.Date getPubDate(java.lang.String date,
                                  java.util.Date def)

    - #### getProperty

          protected java.lang.String getProperty(java.lang.String value,
                                     IvySettings ivy,
                                     java.lang.String name)

    - #### getProperty

          protected java.lang.String getProperty(java.lang.String value,
                                     IvySettings ivy,
                                     java.lang.String name,
                                     java.lang.String resolveId)

    - #### getProperty

          protected java.lang.String getProperty(IvySettings ivy,
                                     java.lang.String name,
                                     java.lang.String resolveId)

    - #### getProperty

          protected java.lang.String getProperty(IvySettings ivy,
                                     java.lang.String name)

    - #### prepareTask

          protected void prepareTask()

      Called when task starts its execution.

    - #### finalizeTask

          protected void finalizeTask()

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

    - #### execute

          public final void execute()
                             throws org.apache.tools.ant.BuildException

      Ant task execute. Calls prepareTask, doExecute, finalzeTask
      Overrides:
        `execute` in class `org.apache.tools.ant.Task`
      Throws:
        `org.apache.tools.ant.BuildException`

    - #### doExecute

          public abstract void doExecute()
                                  throws org.apache.tools.ant.BuildException

      The real logic of task execution after project has been set in the context. MUST be implemented by subclasses
      Throws:
        `org.apache.tools.ant.BuildException`

    - #### toString

          public java.lang.String toString()

      Overrides:
        `toString` in class `java.lang.Object`

    - #### cacheAttributeNotSupported

          protected void cacheAttributeNotSupported()

      Informs the user that the cache attribute is not supported any more.