Often in ANT tasks, you will see "**" used similar to below:
<copy todir="/something"> <fileset dir="/source"> <exclude name="**/*.sql"/> </fileset> </copy>
What is the **
in the name property? I've never seen the style of wildcard. Why is *.sql
not good enough?
FileSets are groups of files. These files can be found in a directory tree starting in a base directory and are matched by patterns taken from a number of PatternSets. FileSets can appear inside tasks that support this feature or at the same level as target - i.e., as children of project .
To run the ant build file, open up command prompt and navigate to the folder, where the build. xml resides, and then type ant info. You could also type ant instead. Both will work,because info is the default target in the build file.
*.sql
means "in the given directory, all the files that end with .sql"
**\*.sql
means "in the given directory and inside all of its subdirectories, all the files that end with .sql"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With