ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From peter reilly <peter.rei...@corvil.com>
Subject Re: problem with macrodefs 'expiring' in 1.6beta2.
Date Thu, 13 Nov 2003 18:31:14 GMT
Hi,
Can you send the macro's that cause the problem
I used 
  <macrodef name="macro1">
    <attribute name="x" default="n"/>
    <sequential>
      <echo>HEllo 1 ${x}</echo>
    </sequential>
  </macrodef>
  <macrodef name="macro2">
    <attribute name="x" default="y"/>
    <sequential>
      <echo>HEllo 2 ${x}</echo>
    </sequential>
  </macrodef>
and  ant E seemed to work correctly.
A:
     [echo] HEllo 1 n

B:
     [echo] HEllo 2 y

C:
     [echo] HEllo 1 n

D:
     [echo] HEllo 1 n

E:

BUILD SUCCESSFUL

Peter

On Thursday 13 November 2003 18:08, Corey Jewett wrote:
> Started converting over to 1.6beta2 yesterday. Macrodef is a sweet
> feature, but it's not working properly with dependencies. Basically I
> have the following:
>
> <target name="A">
>    <macro1/>
> </target>
>
> <target name="B" depends="A">
>    <macro2/>
> </target>
>
> <target name="C" depends="A">
>    <macro1/>
> </target>
>
> <target name="D" depends="A">
>    <macro1/>
> </target>
>
> <target name="E" depends="B,C,D"/>
>
> A  -> works as expected.
> B  -> works as expected. Calls A appropriately.
> C  -> A is called and executes properly. But C does not execute
> properly.
> D  -> same as C.
> E  -> A runs properly. B runs properly. C and D do not execute properly.
>
> By not executing properly I mean that the target 'runs', but the macro
> does not appear to run at all.
>
> It's as if a macro's contents are disposed of once it has been used.
> The only workaround I've found is to cripple my build file by removing
> all offending 'depends' declarations and then calling ant repeatedly
> for each target.
>
> Corey
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org


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


Mime
View raw message