ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jose Alberto Fernandez <>
Subject Re: What flavour of scripting?
Date Wed, 01 Mar 2000 02:49:16 GMT

William Uther wrote:

> -- Jose Alberto Fernandez <> wrote:
> > I like the idea of allowing other languages besides Java. It opens things
> > up. I do not think we should treat scripting languages in any special
> > way. For that I propose just extend <taskdef ...> to allow for other
> > languajes.
> Hmm.  I see two problems with this:
>   (1) You lose the ability to easily place Ant tasks in the scripts.

This I do not understand. What ability is that we are loosing?
You still can use any tasks you want.

>   (2) You make any language easily usable and so require the reader to
> learn whatever the pet language of the writer was.

Today there is nothing that says that you have to provide source code with
your Java tasks. Hence unless I use some decompiler the only thing I know
about a task is the name of the class. We may be reading and modifying the
task's code, but most tomcat users or cocoon user do not. For them is just an
executable. So why should it be any better/worst for tasks defined using other

> This is going to break
> portability, both in terms of having runtimes for these scripting languages
> and in terms of readability.

Notice that we are talking about non-core functionality here. The same thing
if I define my own task in java. I have to provide the classes that it uses or
no one
would be able to use the build.xml file. Which brings a good point, how one
guarantees the the correct task classes are available to ANT when you run it?

I think we will need a way to specify jars containing the code necessary:

  <tasklib name="xyz" jar="....." dir="....">
  <taskdef name="mycopy" tasklib="xyz" classname="....">

This will allow to separate user-provided tasks from core. The <tasklib>'s
atributes can define a jar (JAR file containing the runtime for some tasks)
dir (a directory location containing the runtime).
Here, runtime means things like classes, or resources containing the source for
scripting language. I am not sure whether each user defined task should indicate
the taglib
it comes from (this would allow for the most power) or if the tasklibs should
be added to the classpath. Hummm.

If not tasklib is specified, the default is the classpath (the ANT core).


> later,  (Or, given the current rate of flow on this list, sooner... :)

You were right, sooner...

> \x/ill          :-}

 Jose Alberto Fernandez               500 Oracle Parkway, M/S 9op4
 Development Manager                  Redwood Shores, CA 94065
 ORACLE Corp.                         Phone: (650) 506-8830
 Java Products Group                  Fax: (650) 506-7303
 Languages & Obj-Relational Tech      Email:

View raw message