ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Donald <dona...@apache.org>
Subject Re: Optional tasks
Date Wed, 10 Oct 2001 01:43:52 GMT
On Tue, 9 Oct 2001 21:54, Jose Alberto Fernandez wrote:
> I also prefer the manual declaration of the libraries being used as opposed
> to some auto-install sort of facility. The reason for this is my believe
> that is much better to document in the buildfile which resources are
> required than to assume that every user will find out by other means.

+1000 ;)

> Once you accept this there is no reason to enforce that libraries are
> located in some especific place, they can be anywhere including a remote
> location. ANT may provide a convinient location (${ant.lib}) but it should
> be just that a convinience.

Sounds like a type.lib.path to me ;)

> The next question is how this libraries interact with ClassLoaders. Should
> each library have its own ClassLoader? 

+1

> Should they be able to share them?

-1 the contract of tasks is at XML/TaskModel level and we shouldn't need 
interaction *unless* you inherit from one. (ie extend zip to create war or 
similar). These however can just be considered an "external library". This 
means in a few rare cases we will load certain task classes in multiple 
ClassLoaders but as they can't interact with each other this should not be a 
problem.

> How about external libraries being required? 

I think we should go with the standard java mechanisms for "Optional 
Packages" (see jdk1.3 docs) combined with the ancient Class-Path: foo.jar 
approach. This is what all new APIs are moving towards and is fairly 
flexible. About the only irritating thing is that there is no standard to say 
2.0 is incompatible with 1.0 version of same library ;(

> Shall one be able to specify
> an additional ClassPath for the library?

besides above I would be -1

> <tasklib name="lib1" location="mydir/mytasks.jar" />

I am also -1 on specifying location. We should just give name of library and 
it can be searched for on type.lib.path or whatever.

-- 
Cheers,

Pete

*--------------------------------------------------*
| Wise men don't need advice. Fools don't take it. |
|              -Benjamin Franklin                  |
*--------------------------------------------------*

Mime
View raw message