1

I am having trouble with excludes in a phing fileset. I have the following task

<target name="package" depends="exportsources">
    <if>
        <available file="${exports_dir}" type="dir" />
        <then>
            <tar destfile="${application.startdir}/../package.tar">
                <fileset dir="${exports_dir}">
                    <exclude name="application/cache/" />
                    <exclude name="application/config/" />
                    <exclude name="application/logs/" />
                    <exclude name="build/" />
                    <exclude name="nbproject/" />
                    <exclude name="uploads/" />
                    <exclude name="index.php" />
                    <exclude name="sqlupdates" />
                </fileset>
            </tar>
        </then>
        <else>
            <fail message="Nothing to package!" />
        </else>
    </if>
</target>

The tar task is properly excluding the directories of build/, exclude/, and uploads/ as well as the file index.php.

The three directories under application/ (cache, config, and logs), however, are not being excluded, and neither is the file sqlupdates.

Does anyone have any tips for me, please?

4

0 回答 0