ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Davy Toch <>
Subject Scoped variables in macrodefs using entity includes.
Date Tue, 13 Sep 2005 17:20:11 GMT
Just wanted to share our (temporary) solution we currently use to have 
scoped variables in macrodefs. Not ideal, but it currently works.


<?xml version='1.0'?>
<!DOCTYPE project [
  <!ENTITY uid "be.steria.ant.addon.0.3.base">
<project basedir="." name="&uid;" default="test">

  <import file="macrodef.xml"/>

  <target name="test">
    <property name="&uid;.test" value="zzz"/>
    <echo>&uid;.test : ${&uid;.test}</echo>
    <test-macrodef test="${&uid;test}"/>



<?xml version='1.0'?>
<!DOCTYPE project [
  <!ENTITY uid "be.steria.ant.addon.0.3.test">
<project basedir="." name="&uid;">

  <macrodef name="test-macrodef">
    <attribute name="test"/>
      <property name="&uid;.test" value="yyy"/>
      <echo>&uid;.test : ${&uid;.test}</echo>


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message