wood burning stoves 2.0*
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 | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
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: 5812
    
    7

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://aspose.com/file-tools
 
subject: Ant copy with fileset
 
Similar Threads
WAR file creation using Ant in Java Program
Building Seam projects in Eclipse
Test class should have exactly one public constructor
How do you compile java program?
Axis 2 tutorial - client class compliation error