Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/ant/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何从另一个宏定义中调用Ant宏?_Ant_Macrodef - Fatal编程技术网

如何从另一个宏定义中调用Ant宏?

如何从另一个宏定义中调用Ant宏?,ant,macrodef,Ant,Macrodef,我有一个build.xml,从这里我称之为宏: <import file="macro_file.xml" /> <ant-macro message="Hello, World!" /> 第二个宏宏也在macro_file.xml文件中定义。宏执行其顺序元素中的所有内容。只需将第二个宏调用放入其中: <macrodef name="ant-macro"> <attributes name="message"/> <sequ

我有一个build.xml,从这里我称之为宏:

<import file="macro_file.xml" />
<ant-macro message="Hello, World!" />

第二个宏
宏也在macro_file.xml文件中定义。

宏执行其
顺序
元素中的所有内容。只需将第二个宏调用放入其中:

<macrodef name="ant-macro">
    <attributes name="message"/>
    <sequential>
        <second-macro message="hi"/>
        <echo message="@{message}" />
    </sequential>
</macrodef>

<macrodef name="ant-macro">
    <attributes name="message"/>
    <second-macro messge="hi"/>
    <sequential>
        <echo message="@{message}" />
    </sequential>
</macrodef>
<macrodef name="ant-macro">
    <attributes name="message"/>
    <sequential>
        <second-macro message="hi"/>
        <echo message="@{message}" />
    </sequential>
</macrodef>