下面的命令尝试复制目录列表。它不会复制任何东西。文件列表不允许引用目录吗?
<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>
尝试更改:
<copy todir="${target}">
<filelist id="packages"/>
</copy>
Into:
<copy todir="${target}">
<filelist refid="packages"/>
</copy>