如何使一个Ant副本里一起工作的Ant文件清单 [英] How to make work together an Ant filelist inside an Ant copy

查看:104
本文介绍了如何使一个Ant副本里一起工作的Ant文件清单的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想用下面的文件列表(蚂蚁)的结果是:

I would like to use the result of the following filelist (Ant):

<filelist id="docfiles" dir="doc">
    <file name="foo.xml"/>
    <file name="bar.xml"/>
</filelist>

为以下复制:

<copy todir="folder">
??? 
</copy>

我已经尝试把它们放在一起,如:

I have already tried to put them together like:

<copy todir="folder">
 <filelist id="docfiles" dir="doc">
  <file name="foo.xml"/>
  <file name="bar.xml"/>
 </filelist>
</copy>

但是蚂蚁答案的文件列表中没有一个这样的任务的支持。
谢谢你。

But Ant answer that FileLists is not supported in a such task. Thanks.

推荐答案

在最新的蚂蚁副本任务文档:

指定为嵌套元素的参数结果
  文件集 或任何其他资源收集

Parameters specified as nested elements
fileset or any other resource collection

的用于选择要复制的文件的组资源集合。要使用资源集合,todir属性指定必须设置。

Resource Collections are used to select groups of files to copy. To use a resource collection, the todir attribute must be set.

在此之前的Ant 1.7仅&LT;文件集的方式&gt; 已作为支持嵌套元素

Prior to Ant 1.7 only <fileset> has been supported as a nested element.

由于资源集合包括:


  • 文件集,dirset,文件清单和路径(和派生类型)公开文件资源

  • tarfileset可以根据配置文件暴露或tarentry资源

  • zipfileset可以根据配置文件暴露或ZipEntry的资源

  • 属性集公开财产资源

A 文件清单:中的复制元素应该在1.7蚂蚁工作。

A filelist within a copy element should work in Ant 1.7.

它不会使用Ant 1.6.x的支持。

It will not be supported with Ant 1.6.x.

这篇关于如何使一个Ant副本里一起工作的Ant文件清单的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆