ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <bode...@apache.org>
Subject Re: beta 2 question about typedef
Date Wed, 22 Aug 2001 05:27:52 GMT
On Tue, 21 Aug 2001, Matthew Inger <matti@sedonacorp.com> wrote:

> there is now a "typedef" task in the beta2 version.
> However, it does not seem to be allowed at the same level that
> taskdef is.

Yes, seems to be the case - <typedef> is only allowed within targets -
so much for the bad news.

> if so, how would one go about declaring an instance of the type so
> that you can reference it elsewhere.

The good news: types can be defined within targets as well:

instead of:

> <project ....>
>   <typedef name="mytype" classname="...." />
>   <mytype id="abc" ... />
> </project>

<project>
  <target name="define-abc">
    <typedef name="mytype" classname="...." />
    <mytype id="abc" ... />
  </target>
</project>

and make your targets that want to use abc depend on define-abc.

Stefan

Mime
View raw message