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
2
votes
2 answers

How to delete files that are not present in another directory?

I have two directories, let's call them src and build. My build system works so that for all files with mtime more recent in src than in build it copies the file from src to buid and does some transformations (minification, versioning, etc.).…
Michał Niedźwiedzki
  • 12,859
  • 7
  • 45
  • 47
2
votes
3 answers

Why does ANT update the contents of a fileset after it was created, and can I override this?

I think this may be easiest explained by an example, so here goes: ${toString:fileset}
Vala
  • 5,628
  • 1
  • 29
  • 55
2
votes
1 answer

Adding .class files onto ant classpath for groovc ant task compilation?

I have a project called MyApp in eclipse. I have another project called TestRepository that contains in it, the testcases written for MyApp project. I am trying to compile the testcases and generate a junit report using groovyc ant task whose…
Vamsi Emani
  • 10,072
  • 9
  • 44
  • 71
1
vote
1 answer

Error creating zip file by refid

I'm trying to create 2 zip files as part of an ant task. Both are similar, but one includes some extra data. So to reduce code I'd like to define a fileset and reference it. The only problem is that produces an error. Task:
node1377
  • 13
  • 4
1
vote
1 answer

How to detect whether fileset is defined?

My custom NAnt task relies on a certain fileset. It is considered to be defined by the time the task executes. I'd like to make sure fileset was defined before using it. I'm thinking of something similar to property::exists('property'). I failed to…
Yan Sklyarenko
  • 31,557
  • 24
  • 104
  • 139
1
vote
0 answers

Update fileset using ant dynamically

I would like to create a jar file dynamically depending on selected java modules Here is the part of the ant script which does that.
venu88
  • 41
  • 4
1
vote
1 answer

Ant task: add a file to an archive with a parameter

everyone! I'm currently struggling with an Ant task for a DITA plugin. It would consist in adding a file (whatever the extension is) to an archive via the command line. The idea is to set a parameter like this : dita -f mymap.ditamap -transtype…
Badiou30120
  • 73
  • 2
  • 12
1
vote
2 answers

Use Ant RegEx to find referenced CSS files and then utilize that list as a FileSet

I have a CSS file that I use for testing. It @imports all of my stylesheets: @import "css/structure.css" @import "css/typography.css" @import "css/forms.css" This lets me test the styling and changes, but in a way that you'd never want live. When I…
nathanziarek
  • 619
  • 1
  • 6
  • 16
1
vote
1 answer

Rename a file using fileSet in maven

I am using maven assembly plugin. I am trying to build a tgz with maven and I need a file to be copied with a different name while packaging it. File 'abc.txt' is being copied to directory named 'target'. Is there a way I can rename this file to…
Anirudh Kashyap
  • 297
  • 1
  • 5
  • 16
1
vote
1 answer

Phing: Exclude all directories except one

I'm trying to exclude all dirs which contain the string "export". Only one directory called "exportspecial" should be included. This way "exportspecial" is still not included:
Mike
  • 5,416
  • 4
  • 40
  • 73
1
vote
2 answers

Ant: use include and exclude together

OK, this seems like it should be really simple. I'm using Apache Ant 1.8, and I have a target which does:
Ken
  • 593
  • 1
  • 6
  • 8
1
vote
2 answers

How do I avoid symlinks using an Ant FileSet?

I have a directory tree that includes a symlink to . (the current directory). When I attempt to iterate over this using an Ant FileSet, I get the following error: Caught error while checking for symbolic links at…
dysbulic
  • 3,005
  • 2
  • 28
  • 48
1
vote
0 answers

How to backup files from production server files before uploading using Ant?

I have 3 folders on Windows system: S - Source code folder. A - Application server folder. B - Backup folder. I am able to copy all modified/new files from S to A by using Ant copy command. My requirement is before copying/overwriting files S to…
Hasan Khan
  • 11
  • 2
1
vote
1 answer

Fileset with contains selector for some files but not all

I'm trying to discard @WebService annotated classes in my Ant build using not and contains keywords. However, it isn't working and still includes classes annotated with @WebService. Here is the task used to copy sources to the working build…
Tuomas Toivonen
  • 21,690
  • 47
  • 129
  • 225
1
vote
1 answer

How to conditionally include a zipfileset in Ant

In an Ant zip task, how can I include a zipfileset conditionally? I have tried this: ... But zipfileset does not support if.
eastwater
  • 4,624
  • 9
  • 49
  • 118