how to exclude directories from a phing copy task
Asked Answered
H

2

5

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>
Hohenlohe answered 9/9, 2011 at 15:10 Comment(0)
H
9

Use two * for the subfiles:

<exclude name="cache/**"/>
Humdrum answered 13/9, 2011 at 10:46 Comment(0)
M
2

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>
Morphinism answered 18/3, 2012 at 18:58 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.