*
The moose likes Ant, Maven and Other Build Tools and the fly likes Q Changing directories and list of directories in variable 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 "Q Changing directories and list of directories in variable" Watch "Q Changing directories and list of directories in variable" New topic
Author

Q Changing directories and list of directories in variable

Rasheed Muhammad
Greenhorn

Joined: Dec 15, 2003
Posts: 4
I have to replace a develpoment and deployment system using make with ant. I have a hirecrchical package structure of source files which contained a make file at each level and the rules I had defined would recursively traverse each level, use the makefile present there and make the given targets. Now I am trying to replace each makefile at each level with a build.xml file. These files defines some variables like package_dir, subpackages (a list of subdirs), or at inner levels a variable source_files (list of .java files to be compiled). What I want to do here is that When I run any target from top level I would like to get the list of directories in a variable and go into every directory recursively using cd command and execute the ant task using that level build.xml file. There are 2 things which i'm not able to do. 1- Get the list of directories or files exists in a particular directory into a variable. 2- Iterate the directories in the variable and go inside the directory and execte the ant task using that level build.xml file. Has anybody done a similar thing with ant? I will appreciate all feedback.
 
 
subject: Q Changing directories and list of directories in variable