2011-10-26 58 views
2

以下嘗試複製目錄列表。它不會複製任何東西。文件列表不允許引用目錄嗎?複製螞蟻中幾個目錄的內容

<macrodef name="collect-services-from-build-tree"> 
    <attribute name="src" default="NOT SET"/> 
    <attribute name="target" default="NOT SET"/> 
    <sequential> 
     <property name="src" value="@{src}"/> 
     <property name="target" value="@{target}"/> 
     <filelist id="packages" dir="${src}"> 
      <!-- more like this --> 
      <file name="interface/ui/ui-server/target/ui-install"/> 
     </filelist> 
     <delete dir="${target}" quiet="true"/> 
     <mkdir dir="${target}"/> 
     <copy todir="${target}"> 
      <filelist id="packages"/> 
     </copy> 
    </sequential> 
</macrodef> 

回答

1

嘗試改變:

 <copy todir="${target}"> 
      <filelist id="packages"/> 
     </copy> 

分爲:

<copy todir="${target}"> 
     <filelist refid="packages"/> 
    </copy>