my dog learned polymorphism*
The moose likes Ant, Maven and Other Build Tools and the fly likes Ant DirectoryScanner problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Bookmark "Ant DirectoryScanner problem" Watch "Ant DirectoryScanner problem" New topic
Author

Ant DirectoryScanner problem

Joaquin MorcateJarillo
Greenhorn

Joined: Jan 02, 2009
Posts: 5
Hi,
I have arrange a project layout with a build.xml in the root directory. At the same level I have a directory with tools that I need for that project. These tools are not part of the build, I mean it doesn't contain java code or anything else that is used in the ant build, but it contains a large number of data files with symbolic links. When I run any target (eg. a clean target that just delete a couple of directories) I get an OutOfMemoryError on DirectoryScanner. I wonder if you can exclude a directory from this scan, because even if increment the heap to run Ant, the scan takes too long.

Thank you
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5823
    
    7

I will assume that you have a fileset directive somewhere in your script which is causing the directory scan. You can always add an 'exclude' directive to the fileset to prevent that tool directory from being considered.


JBoss In Action
Joaquin MorcateJarillo
Greenhorn

Joined: Jan 02, 2009
Posts: 5
Thank you Peter,

I don't think that I have any fileset on that directory. I'll check that tomorow but, any how it is a very good hit. Thank you very much. Another thing about this directory is that is has many symbolic links and I don't know if all of then are correct.


Joaquin
Joaquin MorcateJarillo
Greenhorn

Joined: Jan 02, 2009
Posts: 5
You were absolutely right! In my 'clean' target I had the following:


Thank you again, I wouldn't find it out without your help

Joaquin
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Ant DirectoryScanner problem