ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <>
Subject Re: DataTypes
Date Tue, 05 Aug 2003 15:21:45 GMT
On Sun, 3 Aug 2003, Adam Jack <> wrote:

> I did a search and looked at
>, but didn't
> find much on DataTypes.

Mainly because DataTypes are nothing fancy, just beans that follow
Ant's introspection rules.

> 1) When were DataTypes introduce to ant, what release?

In principle with Ant 1.2, but <typedef> didn't exist before Ant 1.4
(and didn't work properly before 1.5).

> 2) What are the primary benefits of DataTypes? Re-use & References?

In 1.6 there is a whole bunch of new opportunities for them, but let's
stick with 1.5.x for now.

I don't know of any benefit other than that you can define them
outside of tasks.  Any nested element can have an id and can thus be

<fileset id="foo" ...>
<copy ...> 
  <fileset refid="foo"/>
<copy ...>
  <fileset refid="foo"/>

is mostly equivalent to

<copy ...> 
  <fileset id="foo" ...>
<copy ...>
  <fileset refid="foo"/>

> 3) Ought pretty much all NestedElement be DataTypes -- to be more
> flexible?

The only flexibility you gain is that you can define them outside of

> 4) I really find this "unfortunate":
> 	<typedef resource="krysalis-version" />
> 	<taskdef resource="krysalis-version" />

Ant 1.6 will change this by using the new antlib concept.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message