开发者

Creating/filtering fileset from a list in a file or from a property with ant

开发者 https://www.devze.com 2023-01-09 15:12 出处:网络
Let us suppose I have a file called \"list-of-files.txt\" with this content: file1.txt file2.properties

Let us suppose I have a file called "list-of-files.txt" with this content:

file1.txt
file2.properties
file3.class

I would like to use this content in a ant :

<fileset filelist="list-of-files.txt" />

Is it possible?

Also, if I had this list of fil开发者_StackOverflow中文版es in a property:

<property name="various.files" value="file1.txt,file2.properties,file3.class" />

is there a way to create a fileset with it? Something like:

<fileset files="${various.files}" />

Thank you in advance!


It sounds like PatternSets might be of help. Look at the includes and includesfile attributes and nested elements. You can also look at the FileSet documentation to see how they're used in that context.

0

精彩评论

暂无评论...
验证码 换一张
取 消