File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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

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

Joined: May 14, 2008
Posts: 5852

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:
subject: Ant copy with fileset
jQuery in Action, 3rd edition