You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by "sbarr@wavesplash.com" <sb...@wavesplash.com> on 2000/03/31 21:21:25 UTC

Re: Script extensions

[Sam Ruby Wrote:]
> >Probably some kind of functional extension along the line of
> >"${prop1}.equals(${prop2})" or similar.
> 
>    <script language="JavaScript">
>      task73.setCondition(prop1 == prop2)
>    </script>

I love the script extensions.

The only issue I have with the above is making sure any feature
(in this case conditional execution based on property value) is
available on _every_ ant installation.  I'm sure we all agree
and are striving for writing one and _only_ one build.xml file for cross
machine/installation/platform use.

By using script extensions for the above, we're limiting the
usefulness of Ant to a particular installation at a 
particular site.  (If Joe peppers his build.xml with
Javascript and Thom peppers his with some other extension scripting
language - their build.xml's won't likely run on each
other's platform since scripting support is optional).

Which raises the the question, how do we guarantee portable/universal
support for a feature like conditional execution above?  (Since I'm
sure this won't be the only programmatic extension that will be
raised):

  - Do we build it into Ant's syntax?
  - Do we force one scripting language to be non-optional (Javascript)?

What's the right approach?

-San