ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Donald <>
Subject Re: Ant2 Feature Request
Date Sun, 18 Mar 2001 04:10:42 GMT

At 09:41  17/3/01 -0600, Ken Wood wrote:
>Actually, I'd like to take this one step farther.
>I'd like to see more consistency across ALL tasks.
>So, if 'ant' task and 'javac' task have failonerror, let's
>provide it in ALL tasks.

See below.

>Similarly, let's get some consitency in names. Some tasks
>use "dir" and "todir", others use "src" and "dest".
>Some tasks use explict filesets, some use implicit
>file sets, and some tasks don't use filesets at all.
>(javadoc, for example).

Covered by 

* use a consistent naming scheme for attributes across all tasks

* make PATH handling consistent. Every task that has a PATH attribute
  must also accept references to PATHs.


I would also add consistent cross-cuts/aspects in tasks. For instance a
cross-cut could be logging/failing behaviour/classpath etc. I mentioned a
while back that I would like to implement this using namespaces in xml

So you could have

<javac ant:classpath="..." ant:fail-on-error="..." ant:logging="verbose"
... />

Because all of the attributes in "ant:" namespace could be handled by the
project engine rather than the task itself. All of the attributes that can
cross-cut the tasks (ie everything but the content/doing aspect) could be
hooked in via a mechanism such as that.

Different namespaces get passed to different "facilities" that handle it.
So the engine would handle the "ant:" namespace while the antdoc facility
would handle the "doc:" namespace etc. End-users could even provide their
own facilities that other aspects are mapped into.

If you are familiar with Aspect Orientated Programming/Separation of
Concerns patters then this will feel familiar to you.

In time you never know but all tasks could in turn have a "file" aspoect
that would allow the content "applied" the the file aspect. A few people
have asked for such a thing but to be honest I am not sure we are ready for
that yet ;)

>I suspect these issues relate to my comment the other
>day about too much cut and paste duplication between tasks.
>When a 'new and improved' way comes along, it's hard to go back and
>cut and paste the NEW way into every tasks that had a copy
>of the OLD way....

Especially when you realize that some of the tasks have been around since
the begining ;)



| "Faced with the choice between changing one's mind, |
| and proving that there is no need to do so - almost |
| everyone gets busy on the proof."                   |
|              - John Kenneth Galbraith               |

View raw message