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>
Use two *
for the subfiles:
<exclude name="cache/**"/>
Well I don't know if it is not just tag for human reading but something like this worked for me:
<fileset dir=".">
<patternset>
<include name="**/*.*" />
<exclude name="dist/**" />
</patternset>
</fileset>
精彩评论