taskphing

how to exclude directories from a phing copy task


i have installed Phing 2.4.7.1 on Windows 7 and use the cygwin bash shell

I created a Phing task to copy files to a local directory and compress files, but I try to exclude certain directories without success. copy entire directory

the task is as follows:

<copy todir="${builddir}" includeemptydirs="true" >
    <fileset dir="." defaultexcludes="true">                
         <exclude name="cache/*" />
         <exclude name="build.*" />
         <exclude name="log/*" />
         <exclude name=".git" />
         <exclude name="/data/*" />
         <exclude name="/nbproject" />
         <exclude name="*~" />
    </fileset>
</copy>

Solution

  • Use two * for the subfiles:

    <exclude name="cache/**"/>