ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jose Alberto Fernandez" <>
Subject Re: [Ant2] Tasks as siblings of <target>
Date Sun, 21 Oct 2001 14:55:17 GMT
From: "Erik Hatcher" <>

> Currently a <script> task could not easily accept a <fileset> as other tasks
> do (as embedded sub elements).  I'm sure there is some roundabout trickery
> that could reference a fileset defined elsewhere, but nothing that provides
> a pluggable framework such that <script> could cleanly take a <fileset> (or
> a set of filesets, attributes, etc) and get the same introspection mechanism
> invoked that a regular Java developed task enjoys.  I don't think I'm
> missing some wonderfully elegant way to accomplish this currently, but if I
> am I'd love to be enlightened as to how.
> Am I at least in the same ballpark as the ideas being discussed here?

Actually I had not gone even that far. :-) Although your point is well taken.
Some of the reasons why I believe the current (or proposed) infrastructure for
task/type declaration may be lacking when declaring other things (scripts, for example)
is that there may be additional information that needs to be registered for this other
things which is not supported by an API just registering name-class pairs.

Granted, the implementation class can always implement its own storage and
its own naming space interpretation. This is the way proposed by the Servlet API,
but in there you have an URL you can use as key for your naming-space.
In the case of ANT, it is a little different since we only have the name of the task
(unless you add some other attribute to identify the actual script). Then, if you want
a good integration you would like to support different namespaces in different
project objects (<projectref>ed or <ant*>ed) not  a fix global space, just as
it should
be for regular tasks. I would be nice if that could be supported transparently.

And of course, the reason why I mentioned scripting on the first place was because
such a construct would in escence be performing a declaration (declaring the script
to be executed) as such it fits my vision of Declaring things. Can it be done by the
current datatypes? Maybe, but DT do not provide different structures for declaring it
and using it, which is what one wants with tasks defined by scripts. Sure we can probably
go around that some more, but when does going around becomes more complex than
what we want to acomplish ourselves?

Jose Alberto

>     Erik
> ----- Original Message -----
> From: "Jose Alberto Fernandez" <>
> To: <>
> Sent: Sunday, October 21, 2001 6:03 AM
> Subject: Re: [Ant2] Tasks as siblings of <target>
> From: "Peter Donald" <>
> > > Define tasks using a scripting language (like javascript) and allow
> > > invoking such tasts simillar to regular tasks. This will definetly need
> > > some new datastructure to store the definition which differs from what
> > > regular taskdef do today.
> >
> > No it doesn't.
> Why do you think it does not? Can you be more specific?
> JA

View raw message