File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Ant, Maven and Other Build Tools and the fly likes Ant copy with fileset Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Reply Bookmark "Ant copy with fileset" Watch "Ant copy with fileset" New topic
Author

Ant copy with fileset

Micale Raj
Ranch Hand

Joined: Jul 01, 2009
Posts: 30

Hi All,

I want to copy files using fileset like following,


(This code don't work.)

In the copy task I want to include/exclude previously defined fileset. How to do this ?

Thanks !
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5536

You can't - a fileset is evaluated at the time it is encountered ans a collection of files is built at that time.

What you want, on the other hand, is to create a list of file names and apply that name in multiple locations. Something like this should work:



Note that "exclude" allows a comma-separated list of file name patterns, so you specific multiple JARs.


JBoss In Action
Micale Raj
Ranch Hand

Joined: Jul 01, 2009
Posts: 30

Thank you very much Peter. Your post helped me resolve the problem. Thanks again !
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: Ant copy with fileset
 
Similar Threads
Test class should have exactly one public constructor
WAR file creation using Ant in Java Program
How do you compile java program?
Building Seam projects in Eclipse
Axis 2 tutorial - client class compliation error