Questions tagged [fileset]

A fileset in Apache Ant is a structure to combine a group of files and perform actions on them.

In Apache Ant, a FileSet is a structure to group a number of files. Many Ant tasks work on filesets, e.g. copy, delete, ...

Usually build-scripts use filesets to select a number of files that should be used for operations later on.

Similar concepts in Ant are DirSet and PatternSet.

See the documentation for details

118 questions
4
votes
1 answer

create a fileset of all files matching a pattern, excluding files with a specific sibling file

I would like to create a fileset of files matching a specific pattern, but exclude from this set any files which have a specific other file in the same directory. E.g., I would like a fileset which matches all ./*/file.xml files, like:
BeeOnRope
  • 60,350
  • 16
  • 207
  • 386
4
votes
1 answer

How can I match files with a space in the pattern in Ant?

Given a directory of source files like this: tester$ ls -l src -rw-r--r-- 1 tester staff 0 24 Feb 11:28 File 1.txt -rw-r--r-- 1 tester staff 0 24 Feb 11:28 File 2.txt -rw-r--r-- 1 tester staff 0 24 Feb 11:28 File 3.txt -rw-r--r-- …
Hakanai
  • 12,010
  • 10
  • 62
  • 132
4
votes
3 answers

Ant absolute path to single file in fileset

I'm using Jenkins with Email-Ext plugin to automate PHP Unit Testing. If the tests failed I want to send a notification email to myself including the zipped test reports. The Email-Ext plugin requires an Ant Fileset definition in the attachment…
papaiatis
  • 4,231
  • 4
  • 26
  • 38
3
votes
1 answer

How do I apply targets to a sublist of projects in Ant?

I have a bunch of sub projects in various directories. I want to specify them as a list, then for a given target I want to go through each one, one-by-one and call subant. I've got something like:
Paul W Homer
  • 2,728
  • 1
  • 19
  • 25
3
votes
4 answers

Emacs filesets: how to run other (elisp, not shell) commands?

There are 5 Elisp commands that can be run on an Emacs fileset, plus the ability to run any shell command. What about all the other Emacs commands? Just to give one example, it would be nice to be able to run M-x occur on a fileset. I know its…
Thorsten
  • 3,451
  • 3
  • 20
  • 25
3
votes
1 answer

Apache Ant - include parent directory in fileset

Is it possible to include a file from a parent directory, seen from the defined dir? If I define a fileset with a given dir, lets say /home/user/workspace/src, is ti possible to include a file e.g…
Robin
  • 303
  • 1
  • 4
  • 16
3
votes
2 answers

Fileset/patternset's refid attribute isn't expanded. How would you write a target that operates on an arbitrary set of files?

I have a set of targets that each do essentially the same thing except each contains a specific patternset on which to perform its tasks. I want to collapse these targets into a single "reusable" target that instead takes a set of files "as a…
Kit
  • 20,354
  • 4
  • 60
  • 103
3
votes
0 answers

Jenkins Post Build Publish JUnit Results not getting all files

I've got files stored in my workspace as: selenium-tests/results/results-0.xml selenium-tests/results/results-1.xml selenium-tests/results/results-2.xml selenium-tests/results/results-3.xml selenium-tests/results/results-4.xml I'm publishing…
TIMBERings
  • 688
  • 1
  • 8
  • 28
3
votes
1 answer

How to exclude empty directories from zipfileset

I have an ant target for creating zip like this - Now, how do I…
darkraven
  • 61
  • 1
  • 1
  • 7
3
votes
1 answer

How to make nant complain when a file is missing from a fileset

I have a fileset element in a build file that is defined as: When this runs (as part of a copy task), it does not complain if any of the…
adrianbanks
  • 81,306
  • 22
  • 176
  • 206
3
votes
0 answers

Run ant target multiple times but replace fileset it refers to

I have an Ant target which runs unit tests on a fileset with a specific name, hardcoded inside of the target. I would like to call that target multiple times, each time setting the fileset to a new value. I cannot change the name of the fileset…
alexandroid
  • 1,469
  • 2
  • 15
  • 32
3
votes
1 answer

DirectoryScanner: getExcludedFiles performance issue using ant fileset

Is there a way to speed up the performance of getExcludedFiles()? I've been play around with the fileset patterns, but could not get any improvement. Here is my situation: I have a fileset defined with these…
2
votes
1 answer

Create a fileset from a comma-separated list in a property without losing order

I use a specified property to create fileset: When casesToBeRunning created, I list the content of it: Cases to be…
JerryCai
  • 1,663
  • 4
  • 21
  • 36
2
votes
0 answers

How does Fileset work using Maven Ant Resolver/?

I have a query in old Ant file which I want to migrate into maven Need help on how to use it using resolver?
2
votes
1 answer

Turning an ant propertyset into a fileset

I have a propertyset, where the values of the properties in the set specify a list of files I want to include in a jar. But I can't seem to figure out how to build a jar from a propertyset, only a fileset. How can I convert the values of a…
skiphoppy
  • 97,646
  • 72
  • 174
  • 218