ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From William Uther <>
Subject Re: What flavour of scripting?
Date Thu, 02 Mar 2000 18:53:02 GMT
--On Thu, Mar 2, 2000 5:47 AM -0500 wrote:

>   <available property="xerces.present"
>       classname="org.apache.xerces.parsers.DOMParser" />
>   <javac srcdir="${src.dir}" destdir="${build.classes}"
>          classpath="${classpath}">
>       <exclude name="**/" unless="xerces.present">
>   </javac>
> I'm hoping that with the above concrete example, you will have an "AHA!"
> experience, and decide that this is not merely a "useless complication".

This gave me somewhat of an AHA! experience :).

One of the problems that people have with <if /> tags seems to be their
nestability.  Adding <if> means embedding tasks in other tasks which could
then become arbitrarily deep.

Would adding 'inner-nested' <if /> and <unless /> be better?

Something like:

  <javac srcdir="${src.dir}" destdir="${build.classes}"
    <exclude name="**/platform/mac/**">
      <unless comparison="${}==Mac OS"/>


  <copydir src="${src.bin.dir}" dest="${bin.dir}">
    <unless comparison="${}==Mac OS"/>

This could be used in conjuction with argument "if", in the same way that
Ant currently has both tag and argument versions of 'includes' and
'excludes'.  This does not require nesting tasks.

As a quick summary, I believe these are the current proposals for 'if':

i) Stay with the current 'if' arguments (maybe slightly enhanced??)
ii) Add <script> tags
iii) Add <if> tags that wrap outside sets of tasks
iv) Add <if> tags that sit inside tasks (probably in conjunction with i)


\x/ill        :-}

View raw message