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
1
vote
1 answer

ANT - How to copy a group of files maintaining the Linux permissions

I need to copy a group of files with ant. Unfortunately I can't use the target "copy" because it loses the Linux file permissions. So must use the target "execute" "cp" . How can I pass a group of file to the execute cp target? I know that I have…
user2572526
  • 1,219
  • 2
  • 17
  • 35
1
vote
0 answers

How to concat or copy files from source to destination depending on if destination file already exists?

Using Ant, I need to copy files to a destination directory, and concatenate to the destination if the file already exists. Below is the source and destination directory structure. src_dir/ /values1/ strings.xml id.xml …
1
vote
1 answer

Fileset with several filtering conditions

I have the following files and folder : -screen_20_08_2013 -xxx.html -connect_21_08_2013 -contact.html -screen_22_09_2013 -yyy.html -screen_23_09_2013 -zzz.xml I would like to zip all folders(including the files) containing screen after a…
Florent Valdelievre
  • 1,546
  • 3
  • 20
  • 32
1
vote
1 answer

Override fileset ref in ANT

I have populated a fileset at the start of script as follows;
SJunejo
  • 1,316
  • 4
  • 23
  • 39
1
vote
1 answer

Copying files matching a regex in ant

I'm having trouble copying some files which match a pattern in my ant script. I have the following:
Bwmat
  • 4,314
  • 3
  • 27
  • 42
1
vote
2 answers

In Ant, how do I specify files with comma in filename?

Here is an example-target that I tried. Turns out, it wants to delete everything because the comma separates "**/*" and "cover" -- understandable.
Harry Pehkonen
  • 3,038
  • 2
  • 17
  • 19
1
vote
1 answer

How do I delete files using absolute path in ant?

I want to delete all the files of certain type in in a folder. However, I only have the absolute path to the folder. What can I do? For example, I might want to delete on the .txt files in C:\example.
GC_
  • 1,673
  • 6
  • 23
  • 39
1
vote
1 answer

How to list all zip files in a specified directory?

I am trying to retrieve the list of all zip files present in a directory. I have a directory ${src} which contains some zip files and I am using the following code
user1856732
  • 119
  • 1
  • 7
1
vote
2 answers

Include ant modified selector based on condition

I am modifying my exiting ant script to support differential builds. For that I have used modified selector in fileset for finding only modified files. But the problem is when I am doing full build I need to bypass modified filter based on some…
Suresh
  • 253
  • 2
  • 4
  • 13
1
vote
1 answer

How can I reuse multiple zipfileset elements in Ant?

We want to build multiple zip files where some of the files have contents in common with others. Rather than specify the full list of files for each zip (they're actually quite large) I thought I would try to get some reuse. So I tried using
Hakanai
  • 12,010
  • 10
  • 62
  • 132
0
votes
3 answers

Why does ant copy old file contents?

I'm having an extremely strange problem with ant. This snippet produces a set of files with the correct names and timestamps, but with obsolete contents.
Byron Hawkins
  • 2,536
  • 2
  • 24
  • 34
0
votes
1 answer

How to pass xml fileset into Ant xslt task as input with one xml output file saxon xslt 3.0

I have a folder of XML files. I'd like to copy some lines from each file into one XML file that I can then use as a lookup. I have an xslt file and an ANT build file but I'm sure there has to be a simple way to do this. Input files look likes…
Caroline
  • 167
  • 1
  • 11
0
votes
1 answer

groovy, ant.fileScanner, fileset, dir - how to use a String variable for the dir parameter in groovy using ant.fileScanner?

I am relatively new in groovy/java, and struggle with a simple task, to process all files following a given pattern in a given directory. I tried this below, but as soon as try to use a variable instead of a fixed string for the directory of a…
K.Isbruch
  • 145
  • 2
  • 8
0
votes
0 answers
0
votes
2 answers

How to include a file from a directory above in Maven src.xml?

I want to include the .gitignore file in my Maven project when it is getting packaged. (My university wants the file so they can see that I used it the right way) But the .gitignore is on the workspace directory. I know that I can add files from…
Samuel
  • 388
  • 5
  • 15