ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Costin Manolache <>
Subject RE: polymorphism (was Re: antlib)
Date Fri, 25 Apr 2003 22:14:17 GMT
Dominique Devienne wrote:

> No need for parsing! Don't know about ClassLoader#getResources??? --DD

I meant "open the jar, read the entry". That requires a jar to exist - if
you want to package multiple libs in a jar, you need to merge the
descriptors ( will this allow multiple namespaces ? )

Some people consider even getRealPath() to be a bad thing because you access
the file system directly ( I disagree - but they have some points ).

Regarding getResources() - you can use it to get all META-INF/antlib.xml
that are visible in a certain loader. For example if you want to load all
the libraries. Again, using the filesystem directly is not perfect.


>> -----Original Message-----
>> From: Costin Manolache []
>> I don't like passing the .jar very much - but that's probably the only
>> way if we want to use META-INF/antlib.xml.
>> The alternative would be to use /net/sf/antcontrib/antlib.xml (i.e.
>> descriptor in a package ), and use "antlib:net.sf.antcontrib" as
>> namespace.
>> Then getResource() can be used, and we don't have to worry about
>> multiple jars providing META-INF/antlib.xml - which forces us to use the
>> .jar file directly.

View raw message