ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jlcarpen...@household.com
Subject How do I create ant task elements nested two or more deep?
Date Tue, 20 Aug 2002 21:44:26 GMT

Consider the following build file for which I understand how to create the
ant task:

      <target name="sometarget">
            <sometask attribute1="bla">
                  <subelementA attribute2="bla"/>
                  <subelementA attribute2="bla"/>
            </sometask>
      </target>

In this case, only the class corresponding to sometask needs to extend
org.apache.tools.ant.Task.
The class corresponding to subelmentA can be a simple data container class
and need not extend org.apache.tools.ant.Task.
The sometask class will need to implement addSubElementA,
addConfiguredSubElementA, or createSubElementA.

Now consider the following build file for which I don't understand how to
create the ant task.

      <target name="somefancytarget">
            <somefancytask attribute1="bla">
                  <subfancyelementA attribute2="bla">
                        <subfancyelementB attribute3="bla"/>
                        <subfancyelementB attribute3="bla"/>
                  </subfancyelementA>
            </somefancytask>
      </target>

Can subfancyelementA and subfancyelementB still be simple container
classes?
If so would the class corresponding to subfancyelementA need to implement
addSubFancyElementB, addConfiguredSubFancyElementB, or
createSubFancyElementB?

If the above guesses are wrong, can someone explain what I should be doing?

James Lee Carpenter
Software Engineer
Household Technical Services
6602 Convoy Court
San Diego, CA 92111

ph: 858-609-2461
email: jlcarpenter@household.com



--
To unsubscribe, e-mail:   <mailto:ant-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-dev-help@jakarta.apache.org>


Mime
View raw message