ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Magesh Umasankar" <umag...@apache.org>
Subject Re: <macrodef> and local
Date Wed, 23 Jun 2004 02:40:06 GMT
From:       Steve Loughran <steve_l () iseran ! com>
Date:       2004-06-17 9:27:18

> I am now convinced we need local properties; without 
> it macrodef doesnt work fully.

Why do you need them?  I typically append an attribute
value to a property name to get the unique property that
I want.

I have had reasonable success with a <break> task[*]
that compensates for lack of if/unless/depends on
macros.

Cheers,
Magesh

[*]
Syntax: <break [if|unless]="property.name"/>

<macrodef name="check-and-do-ejb">
   <attribute name="module">
   <sequential>
      <check-ejb module="@{module}"/>
      <break if="@{module}-uptodate"/>
      <ejb module="@{module}"/>
   </sequential>
</macrodef>

(or)
<macrodef name="ejb">
   <attribute name="module">
   <sequential>
      <break if="@{module}-uptodate"/>
      <...>
   </sequential>
</macrodef>

<macrodef name="check-and-do-ejb">
   <attribute name="module">
   <sequential>
      <check-ejb module="@{module}"/>
      <ejb module="@{module}"/>
   </sequential>
</macrodef>


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Mime
View raw message