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 is it a bug or somethingelse? Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of Practical Unit Testing with TestNG and Mockito this week in the Testing forum!
JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Reply Bookmark "is it a bug or somethingelse?" Watch "is it a bug or somethingelse?" New topic
Author

is it a bug or somethingelse?

Ayse Muge
Greenhorn

Joined: Jul 22, 2004
Posts: 5
Hi all,

all files and subdirectories under the 'build' directory are deleted but in the 'src' directory files are deleted but subdirectories structure remains the same without any files...I did not be allowed to add topic with normal code segmet that's why I written as above sorry...

Any suggestion?
Thnx

target
delete includeemtydirs=true
fileset dir=build includes=**/*
fileset dir=src includes=**/*
delete
target
Paul Sturrock
Bartender

Joined: Apr 14, 2004
Posts: 10336

Its not a bug, filesets are behaving as documented. Just specify the directory in your fileset if you want to delete the directory, not the file pattern. e.g.:


JavaRanch FAQ HowToAskQuestionsOnJavaRanch
Ayse Muge
Greenhorn

Joined: Jul 22, 2004
Posts: 5
I wanna delete all files and subdirectories under the src and build directories.

In build directory it works(all files and subdirectories are deleted) but in src directory just files are deleted under the subdirectories. Subdirectory structure are not deleted.

My question is that why delete task works for build not the src directory?
 
 
subject: is it a bug or somethingelse?
 
Threads others viewed
problem in making jar and war based on the 'src' package hierarchy!
NX: Inserting Directories Into Jar With Ant
Why 'gen-src\primer.po is not found'?
Ant task to delete directory contents
ANT Complilation Issue
MyEclipse, The Clear Choice

cast iron skillet 49er

more from paul wheaton's glorious empire of web junk: cast iron skillet diatomaceous earth rocket mass heater sepp holzer raised garden beds raising chickens lawn care CFL flea control missoula heat permaculture