aspose 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 | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
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: 5836
    
    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