I'm using Phing to create build files, but I've noticed that it does not appear to be able to execute the zip task:
<target name="makeroot">
<echo msg="Making directory Template" />
<mkdir dir="./../Template" />
</target>
<target name="makefolders" depends="makeroot">
<echo msg="Making folders within Template" />
<mkdir dir="./../Template/class" />
<mkdir dir="./../Template/function" />
<mkdir dir="./../Template/include" />
<mkdir dir="./../Template/script" />
<mkdir dir="./../Template/style" />
</target>
<target name="build" depends="m开发者_如何学运维akefolders">
<echo msg="Copying files to build directory..." />
<copy file="./class/ErrorHandler.class.php" tofile="./../Template/class/ErrorHandler.class.php" />
<copy file="./function/validate.func.php" tofile="./../Template/function/validate.func.php" />
<copy file="./include/standard_form.inc.php" tofile="./../Template/include/standard_form.inc.php" />
</target>
<target name="dist" depends="build">
<echo msg="Creating archive..." />
<zip destfile="temp.zip" basedir="C:\Program Files\wamp\www\sites\Template">
<include name="*" />
</zip>
<echo msg="Files copied and compressed in build directory OK!" />
</target>
The first two tasks execute as expected, but the last one doesn't. Any Phing gurus out there able to lend me a hand with this?
I suspect that the issue is with your path/fileset configuration. This is what we use to package web2project using Phing. The "packaging" directory is within the current working directory.
<zip destfile="web2project-${releaseName}.zip">
<fileset dir="packaging/">
<include name="**/**" />
</fileset>
</zip>
精彩评论