componentdef

Description

Adds a component definination to the current project. A compenent definition is the same as a typedef except:

  1. that it can only be used in other types or tasks that accept components (by having an add() method).
  2. multiple components may have the same name, provided them implement different interfaces.

The purpose of this it allow internal ant definitions to be be made for tags like "and" or "or".

Examples

 <componentdef name="or" onerror="ignore"
    classname="com.apache.tools.ant.taskdefs.conditions.Or"/>
  <componentdef name="or" onerror="ignore"
    classname="com.apache.tools.ant.types.resources.selectors.Or"/>

defines two components with the same name "or", one is a condition (see conditions) and one is a selector (see selectors).