ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dominique Devienne <DDevie...@lgc.com>
Subject IDs and macrodef
Date Fri, 12 Dec 2003 11:02:22 GMT
Hi Peter and al.,

How do macrodef and IDs interact? Suppose I want to define an ID'd path or
fileset inside a macro, something like so:

<macrodef name="foo">
  <attribute name="bar"/>
  <sequential>
    <path id="${bar}" location="build/classes/${bar}" />
    ...
  </sequential>
</macrodef>

<foo bar="acme-rt" />
<foo bar="acme-mt" />
<foo bar="acme-pt" />

<path id="classpath">
  <path refid="acme-rt" />
  <path refid="acme-mt" />
  <path refid="acme-pt" />
</path>

(Note that's I'm still using beta1, thus the ${name} notation...)

Since IDs are processed at parse time (are they still?), I suspect
the Ant code below won't go down too well???

Note that the example is contrived, and a bit silly as-is,
but hopefully shows the gist of what I'm wondering... --DD

PS: Also, is some form of local for macrodef in beta3?
    I think I need it to do something...

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


Mime
View raw message