2015-12-23 40 views
0

我試圖更新ant腳本,我想要在outputpropertyexec任務中獲取新輸出。下面是我的螞蟻腳本。如何在exec腳本中更改ant腳本中for循環的outputproperty值

<target name="print_process_list"> 
    <echo message="print_process_list start"/> 
    <echo message="${compile_project_lists} "/> 
    <echo message="print_process_list end"/> 
</target> 
<target name="buildall" depends="print_process_list"> 
    <ac:for list="${compile_project_lists}" param="iprocess"> 
      <sequential> 
      <exec executable="./ant_xml_pars.sh" outputproperty="ant_parstout" failonerror="false" > 
            <arg value="@{iprocess}"/> 
          </exec> 
          <echo message="${ant_parstout} " /> 
     </sequential> 
    </ac:for> 

ant_xml_pars.sh基於從名單通過的iProcess給輸出。 ant_parstout取第一次迭代輸出。但其值在循環中的後續迭代中不會改變。 我的要求是根據作爲參數傳遞的進程獲取ant_parstout中的輸出。 我試過macrodef但沒有成功。

回答