ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <cost...@covalent.net>
Subject Tasks, DataTypes and Factories
Date Wed, 06 Mar 2002 17:09:32 GMT
At this moment, there are 2 major differences between task/datatype:

1. Datatypes are allowed at top level. Only 3 tasks are allowed ( by 
hardcoding their names in ProjectHelperImpl ).
2. Tasks have an execute method that is called. Datatypes don't.
( however filters do have a special method, and it is possible other 
datatypes will have some other 'active' method ).

Both Task and DataTypes extend from ProjectComponent. Tasks have 
a mechanism to allow regular beans ( not extending Task ) to be 
used. 

Tasks and DataTypes are registered using a name and a Class, and 
are created using newInstance() by some code in Project.

What I'm trying to do:
1. Create a mechanism to allow the ProjectComponent creation to be
delegated to an optional factory ( ProjectComponentHelper ).
 The optional factory may use more advanced logic to locate
 and create the tasks. This will make things like <antlib> implementable 
without changes in the core.

2. Allow the use of optional namespaces in tasks. We already have 
too many tasks in the default namespace, some grouping would
improve the readability and maintainability. Of course, all 
 existing tasks will continue to work without namespaces.
This require a new method in Project: createComponent() that
will take a namespace and a tag name. 

3. Make the 'top level tasks' more flexible. I would prefer
allowing all tasks at top level, but anything better than
3 hardcoded tasks is ok.

4. Make task/datatyle creation and behavior more consistent
with each other. They should use similar code for creation,
adapters ( for 'external' beans not implementing ant interfaces).

Votes/comments please. The initial interface for component
creation is checked into proposals/sandbox/embed/ProjectComponentHelper.

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