以下尝试复制目录列表。它不会复制任何东西。文件列表是否不允许引用目录?
<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>
答案 0 :(得分:1)
尝试更改:
<copy todir="${target}">
<filelist id="packages"/>
</copy>
进入:
<copy todir="${target}">
<filelist refid="packages"/>
</copy>