Tuesday, May 8, 2012

Ant task to find all java files in dir

                     

                   Some time we need to identify all file names in our project. For documentation purpose or for creating modification estimate etc. Following is the ant target that you can use to do the job. here the list of file name will be printed with semi colon ; as delimiter.
  
 
  
   
    
   
   
    list of files: 
   ${prop.javafiles}
  
                     
                   In above snippet:  ${dir.src} will be the location of source code Output will look like following
  
list:

  [echo]  list of files: 

  [echo]com\test\listproject\AdapterController.java;com
\test\listproject\cleanup\BppmDifferenceData.java;com\
test\listproject\cleanup\CleanupException.java; 
com\test\listproject\cleanup\CleanupManager.java

BUILD SUCCESSFUL

Total time: 0 seconds

No comments: