ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Costin Manolache <cmanola...@yahoo.com>
Subject RE: Antlib... when?
Date Tue, 07 Jan 2003 17:48:13 GMT
Jose Alberto Fernandez wrote:


>> > Several of the issues exposed here like what to do about redefining
>> > tasks and so on where addressed on the proposal in the
>> /antlib/ which
>> > I wrote.
>> 
>> My primary concern with this particular proposal - the XML
>> descriptor.
>> I'm fine with it as long as a simple antlib is also supported, using
>> .properties.
>> 
> 
> The main issue with this is that it needs to support declaring tasks
> and datatypes, so a simple .properties would not do.

At the moment the distinction between tasks and datatypes is almost gone.
If you really want to keep the separated - we could use 2 properties, 
one for tasks and one for datatypes.

I think it would be quite easy to remove the last remaining distinction - 
at least for new antlibs. It's not very hard and if done only for new 
antlibs it won't affect backward compat. 

We just need to treat all antlibs as components. If a component implements
Task - it'll be a task. If not - it'll not be wrapped in TaskAdapter ( as 
 a task would be ) unless it has an execute() method. That will mean that 
any datatype that is included in an antlib will have the additional 
restriction - no execute() method.


> On the otherhand, the proposal came with a nice <antjar> task that could
> be made to generate the XML for you based on some simpler description.
> So it does not have to be dificult.

The fact that you have tools doesn't mean it's simple or easy - quite
the contrary :-)

There is also the overhead of parsing dozens of XML files, understanding
and explaining all the elements. Also the danger of future model complexity
and raising the bar.

Again - I have no problem with using XML for advanced antlibs where it may
be really needed. But I'll strongly opose not having the "simple" option.
Especially since many "taskdef" libs use properties file already, and 
the concept is widely understood.


>> There is also the issue of automatic loading of antlibs
>> versus explicit
>> declaration. At least Conor and me ( convinced by Conor ) expressed
>> a preference to explicit.
>> 
> 
> To me the reason for automatic loading is to allow ANT core itself
> to use and <antlib> to load. I would hate having two different mechanisms
> one for core and one for non-core. Whether the autoload libraries
> are "discovered" or explicitly mentioned somewhere is a separate issue.

The loading for the core tasks works fine. And we would have the same 
mechanism for core and for simple antlibs - the same properties file
( or 2 if we want to keep types separated ).

Costin 






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


Mime
View raw message