Friday 11 March 2011

Making jar file using ant

Today I tested with making a jar file using ant according to a tutorial. Below are the simple build.xml I used and it works.


  
    
  
  
    
  


But I wasn't sure what "**" means in the includes file pattern. Turns out that this is a special feature in the ant syntax which makes it possible to match multiple directory levels. This can be used to match a complete directory tree, or a file anywhere in the directory tree. To do this, ** must be used as the name of a directory. When ** is used as the name of a directory in the pattern, it matches zero or more directories. For example: /test/** matches all files/directories under /test/, such as /test/x.java, or /test/foo/bar/xyz.html, but not /xyz.xml. Details can be found here.

No comments :

Post a Comment