You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by Stefan Bodewig <bo...@apache.org> on 2003/11/11 10:58:37 UTC

ant-type attribute (was Re: antlibs/namespaces)

On Thu, 6 Nov 2003, peter reilly <pe...@corvil.com> wrote:
> On Thursday 06 November 2003 10:02, Stefan Bodewig wrote:
>> On Wed, 5 Nov 2003, peter reilly <pe...@corvil.com> wrote:

>> > well there is an undocumented attribute ant-type
>>
>> we really should document it.
> Yes...
> 
> Note that when this feature was first disussed it was pointed out
> that ant-type does not work for Type create<NestedElement>() methods
> - like <src/> in javac.

True.

> It was assumed that one could add new methods -
> add<NestedElement>(Type..)  to get around this problem, and make
> add<NestedElement> have a lower priorirty than
> create<NestedElement>().

I never assumed that 8-)

You can't replace all of the current createXYZ methods as some of them
would return things that Ant's core wasn't able to create at all
(inner classes for example) - or do special things like the Path
creating methods that join all subelements.

I'd prefer to document the limitation and probably live with
explicitly noting that ant-type won't work for the nested elements
that are affected.

We'll also have to explain why

<copy>
  <fileset ant-type="zipfileset" src="foo.zip" prefix="bar"/>
</copy>

won't work as expected (because <copy> unlike <zip> doesn't know
anything about ZipFileSet and ZipFileSet is no drop-in replacement for
FileSet).

Stefan

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